The document handler for XHTML document markup.
Source for this file: /Document/src/document/xml/xhtml.php
ezcDocument | --ezcDocumentXmlBase | --ezcDocumentXhtml
Version: | //autogen// |
protected array(ezcDocumentXhtmlFilter) |
$filters
Array with filter objects for the input HTML document. |
From ezcDocumentXmlBase | |
---|---|
protected |
ezcDocumentXmlBase::$document
|
From ezcDocument | |
protected |
ezcDocument::$errors
|
protected |
ezcDocument::$options
|
protected |
ezcDocument::$path
|
protected DOMDocument |
buildDocbookDocument(
$document
)
Build docbook document out of annotated XHtml document |
public void |
createFromDocbook(
$document
)
Create document from docbook document |
public ezcDocumentDocbook |
getAsDocbook(
)
Return document compiled to the docbook format |
protected void |
isInlineElement(
$element
)
Check if the current node is an inline element |
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(
$xhtml
, $docbook
, [ $significantWhitespace
= false] )
Recursively transform annotated XHtml elements to docbook |
public mixed |
validateFile(
$file
)
Validate the input file |
public mixed |
validateString(
$string
)
Validate the input string |
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 |
Build docbook document out of annotated XHtml document
Name | Type | Description |
---|---|---|
$document |
DOMDocument |
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.
Name | Type | Description |
---|---|---|
$document |
ezcDocumentDocbook |
Method | Description |
---|---|
ezcDocument::createFromDocbook() |
Create document from docbook document |
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.
Method | Description |
---|---|
ezcDocument::getAsDocbook() |
Return document compiled to the docbook format |
Check if the current node is an inline element
Textual content is only allowed in inline element. This method returns true if the current element is an inline element, otherwise text contents might be ignored in the output.
Name | Type | Description |
---|---|---|
$element |
DOMElement |
Create document from input string
Create a document of the current type handler class and parse it into a usable internal structure.
Name | Type | Description |
---|---|---|
$string |
string |
Method | Description |
---|---|
ezcDocumentXmlBase::loadString() |
Create document from input string |
Return document as string
Serialize the document to a string an return it.
Method | Description |
---|---|
ezcDocumentXmlBase::save() |
Return document as string |
Set filters
Set an array with filter objects, which extract the sematic information from the given XHtml document.
Name | Type | Description |
---|---|---|
$filters |
array |
Recursively transform annotated XHtml elements to docbook
Name | Type | Description |
---|---|---|
$xhtml |
DOMElement | |
$docbook |
DOMElement | |
$significantWhitespace |
bool |
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.
Name | Type | Description |
---|---|---|
$file |
string |
Method | Description |
---|---|
ezcDocumentValidation::validateFile() |
Validate the input file |
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.
Name | Type | Description |
---|---|---|
$string |
string |
Method | Description |
---|---|
ezcDocumentValidation::validateString() |
Validate the input string |