OpenOffice-OODoc

 view release on metacpan or  search on metacpan

OODoc/Manifest.pod  view on Meta::CPAN

=head1	NAME

OpenOffice::OODoc::Manifest - Access to document file descriptor

=head1	DESCRIPTION

The OpenOffice::OODoc::manifest class is a specialist derivative of
OpenOffice::OODoc::XPath allowing access to the content descriptor
of an OpenDocument or OpenOffice.org file.

For ordinary content processing applications, it's not absolutely
necessary to control the manifest. Member imports or deletions
(ex: createImageElement() in OpenOffice::OODoc::Image, raw_delete()
in OpenOffice::OODoc::File) may make the real content inconsistent
with the manifest. Up to now, the OpenOffice.org desktop suite don't
worry about that. However, OpenOffice::OODoc::Manifest provides a
few number of easy to use methods to get or set any entry in the
manifest. In addition, it allows the users (at their own risks) to
create or update any kind of special entry or mime type, without
control. There is no automatic consistency check between the manifest
and the real content (but this check and others could be easily
developed with the combination of this module and the other ones).

The manifest (i.e. the "META-INF/manifest.xml" part of an ODF package)
is a special member that describes the MIME types and the full internal
paths of the other members.

=head2	Methods

=head3	Constructor : OpenOffice::OODoc::Manifest->new(<parameters>)

        Short Form: odfManifest(<parameters>)

        See OpenOffice::OODoc::XPath->new

        The XML member loaded by default is 'META-INF/manifest.xml'.

        Example:

            $my manifest = OpenOffice::OODoc::Manifest>new
            			(
				file	=> 'document.odt'
				);

        returns a new object which represents the member list of an
        ODF-compliant "document.odt" file.

=head3	getEntry($entry)

	Returns the element (if any) corresponding to the given member.

	Example:

		my $element = $manifest->getEntry("content.xml");

	Returns the element describing the "content.xml" member of the
	file, if this element is defined.
	
=head3	getMainType()

	Returns the main MIME type of the document.
	For example, this type is
	
		"application/vnd.oasis.opendocument.text"
		
	for an OpenDocument text file or
	
		"application/vnd.oasis.opendocument.presentation"
		
	for an OpenDocument presentation, or
	 
		"application/vnd.sun.xml.writer"
		
	for an OpenOffice.org 1.0 text file, etc.
	



( run in 0.931 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )