Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcDocumentOdt

Document::ezcDocumentOdt

Class ezcDocumentOdt

The document handler for Open Document Text (ODT) documents.

Source for this file: /Document/src/document/xml/odt.php

ezcDocument
   |
   --ezcDocumentXmlBase
      |
      --ezcDocumentOdt
Version:   //autogen//

Constants

NS_DC = 'http://purl.org/dc/elements/1.1/'
NS_EZC = 'http://ezcomponents.org/Document/Odt'
NS_ODT_CONFIG = 'urn:oasis:names:tc:opendocument:xmlns:config:1.0'
NS_ODT_DRAWING = 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0'
NS_ODT_FO = 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0'
NS_ODT_META = 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'
NS_ODT_NUMBER = 'urn:oasis:names:tc:opendocument:xmlns:data style:1.0'
NS_ODT_OFFICE = 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'
NS_ODT_SCRIPT = 'urn:oasis:names:tc:opendocument:xmlns:script:1.0'
NS_ODT_STYLE = 'urn:oasis:names:tc:opendocument:xmlns:style:1.0'
NS_ODT_SVG = 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0'
NS_ODT_TABLE = 'urn:oasis:names:tc:opendocument:xmlns:table:1.0'
NS_ODT_TEXT = 'urn:oasis:names:tc:opendocument:xmlns:text:1.0'
NS_XLINK = 'http://www.w3.org/1999/xlink'
NS_XML = 'http://www.w3.org/XML/1998/namespace'

Member Variables

protected array(ezcDocumentOdtFilter) $filters
Array with filter objects for the input ODT document.

Inherited Member Variables

From ezcDocumentXmlBase
protected ezcDocumentXmlBase::$document
From ezcDocument
protected ezcDocument::$errors
protected ezcDocument::$options
protected ezcDocument::$path

Method Summary

protected DOMDocument buildDocbookDocument( $document )
Build docbook document out of annotated ODT document
public void createFromDocbook( $document )
Create document from docbook document
public ezcDocumentDocbook getAsDocbook( )
Return document compiled to the docbook format
public void loadString( $string )
Create document from input string.
public string save( )
Return document as string
public void setFilters( $filters )
Set filters
protected void transformToDocbook( $odt , $docbook , [ $significantWhitespace = false] )
Recursively transform annotated ODT elements to docbook
public mixed validateFile( $file )
Validate the input file
public mixed validateString( $string )
Validate the input string

Inherited Methods

From ezcDocumentXmlBase
public DOMDocument ezcDocumentXmlBase::getDomDocument()
Get DOMDocument
public void ezcDocumentXmlBase::loadDomDocument()
Construct directly from DOMDocument
public void ezcDocumentXmlBase::loadString()
Create document from input string
public string ezcDocumentXmlBase::save()
Return document as string
public void ezcDocumentXmlBase::setDomDocument()
Set DOMDocument
From ezcDocument
public ezcDocument ezcDocument::__construct()
Construct new document
public abstract void ezcDocument::createFromDocbook()
Create document from docbook document
public abstract ezcDocumentDocbook ezcDocument::getAsDocbook()
Return document compiled to the docbook format
public array ezcDocument::getErrors()
Return list of errors occured during visiting the document.
public string ezcDocument::getPath()
Get document base path
public void ezcDocument::loadFile()
Create document from file
public abstract void ezcDocument::loadString()
Create document from input string
public abstract string ezcDocument::save()
Return document as string
public void ezcDocument::setPath()
Set document base path
public void ezcDocument::triggerError()
Trigger visitor error

Methods

buildDocbookDocument

DOMDocument buildDocbookDocument( $document )

Build docbook document out of annotated ODT document

Parameters:
Name Type Description
$document DOMDocument

createFromDocbook

void createFromDocbook( ezcDocumentDocbook $document )

Create document from docbook document

A document of the docbook format is provided and the internal document structure should be created out of this.

This method is required for all formats to have one central format, so that each format can be compiled into each other format using docbook as an intermediate format.

You may of course just call an existing converter for this conversion.

Parameters:
Name Type Description
$document ezcDocumentDocbook
Redefinition of:
Method Description
ezcDocument::createFromDocbook() Create document from docbook document

getAsDocbook

ezcDocumentDocbook getAsDocbook( )

Return document compiled to the docbook format

The internal document structure is compiled to the docbook format and the resulting docbook document is returned.

This method is required for all formats to have one central format, so that each format can be compiled into each other format using docbook as an intermediate format.

You may of course just call an existing converter for this conversion.

Redefinition of:
Method Description
ezcDocument::getAsDocbook() Return document compiled to the docbook format

loadString

void loadString( string $string )

Create document from input string.

Create a document of the current type handler class and parse it into a usable internal structure.

Parameters:
Name Type Description
$string string
Redefinition of:
Method Description
ezcDocumentXmlBase::loadString() Create document from input string

save

string save( )

Return document as string

Serialize the document to a string an return it.

Redefinition of:
Method Description
ezcDocumentXmlBase::save() Return document as string

setFilters

void setFilters( $filters )

Set filters

Set an array with filter objects, which extract the sematic information from the given ODT document.

Parameters:
Name Type Description
$filters array

transformToDocbook

void transformToDocbook( $odt , $docbook , [bool $significantWhitespace = false] )

Recursively transform annotated ODT elements to docbook

Parameters:
Name Type Description
$odt DOMElement
$docbook DOMElement
$significantWhitespace bool

validateFile

mixed validateFile( string $file )

Validate the input file

Validate the input file against the specification of the current document format.

Returns true, if the validation succeded, and an array with ezcDocumentValidationError objects otherwise.

Parameters:
Name Type Description
$file string

validateString

mixed validateString( string $string )

Validate the input string

Validate the input string against the specification of the current document format.

Returns true, if the validation succeded, and an array with ezcDocumentValidationError objects otherwise.

Parameters:
Name Type Description
$string string
Documentation generated by phpDocumentor 1.4.3