Document: ezcDocumentRstXhtmlVisitor
[ ]
[ Conversion ] [ Styles ]
[ ]
[ ]
[ ]
[ ]
Class: ezcDocumentRstXhtmlVisitor
|
HTML visitor for the RST AST. [
source]
Parents
ezcDocumentRstVisitor
|
--ezcDocumentRstXhtmlVisitor
Descendents
| Child Class |
Description |
| ezcDocumentRstXhtmlBodyVisitor |
HTML visitor for the RST AST, which only produces contents to be embedded somewhere into the body of an existing HTML document.
|
Inherited Constants
From
ezcDocumentRstVisitor:
Member Variables
|
protected array |
$complexVisitMapping
= array( 'ezcDocumentRstSectionNode' => 'visitSection', 'ezcDocumentRstTextLineNode' => 'visitText', 'ezcDocumentRstMarkupInterpretedTextNode' => 'visitInterpretedTextNode', 'ezcDocumentRstExternalReferenceNode' => 'visitExternalReference', 'ezcDocumentRstMarkupSubstitutionNode' => 'visitSubstitutionReference', 'ezcDocumentRstTargetNode' => 'visitInlineTarget', 'ezcDocumentRstAnonymousLinkNode' => 'visitAnonymousReference', 'ezcDocumentRstBlockquoteNode' => 'visitBlockquote', 'ezcDocumentRstBulletListListNode' => 'visitBulletList', 'ezcDocumentRstEnumeratedListListNode' => 'visitEnumeratedList', 'ezcDocumentRstReferenceNode' => 'visitInternalFootnoteReference', 'ezcDocumentRstLineBlockNode' => 'visitLineBlock', 'ezcDocumentRstLineBlockLineNode' => 'visitLineBlockLine', 'ezcDocumentRstLiteralNode' => 'visitText', 'ezcDocumentRstCommentNode' => 'visitComment', 'ezcDocumentRstDefinitionListNode' => 'visitDefinitionListItem', 'ezcDocumentRstTableCellNode' => 'visitTableCell', 'ezcDocumentRstFieldListNode' => 'visitFieldListItem', 'ezcDocumentRstDirectiveNode' => 'visitDirective', )
Mapping of class names to internal visitors for the respective nodes. |
|
protected int |
$depth
= 0
Current depth in document. |
|
protected DOMDocument |
$document
DOM document |
|
protected DOMElement |
$head
Reference to head node |
|
protected ezcDocumentHtmlConverterOptions |
$options
HTML rendering options |
|
protected array |
$simpleVisitMapping
= array( 'ezcDocumentRstParagraphNode' => 'p', 'ezcDocumentRstMarkupEmphasisNode' => 'em', 'ezcDocumentRstMarkupStrongEmphasisNode' => 'strong', 'ezcDocumentRstMarkupInlineLiteralNode' => 'code', 'ezcDocumentRstBulletListNode' => 'li', 'ezcDocumentRstEnumeratedListNode' => 'li', 'ezcDocumentRstLiteralBlockNode' => 'pre', 'ezcDocumentRstTransitionNode' => 'hr', 'ezcDocumentRstDefinitionListListNode' => 'dl', 'ezcDocumentRstTableNode' => 'table', 'ezcDocumentRstTableHeadNode' => 'thead', 'ezcDocumentRstTableBodyNode' => 'tbody', 'ezcDocumentRstTableRowNode' => 'tr', /* 'ezcDocumentRstMarkupInlineLiteralNode' => 'literal', */ )
Direct mapping of AST node class names to docbook element names. |
|
protected array |
$skipNodes
= array( 'ezcDocumentRstNamedReferenceNode', 'ezcDocumentRstAnonymousReferenceNode', 'ezcDocumentRstSubstitutionNode', 'ezcDocumentRstFootnoteNode', )
Array with nodes, which can be ignored during the transformation process, they only provide additional information during preprocessing. |
Inherited Member Variables
From
ezcDocumentRstVisitor:
Method Summary
|
public void |
__construct(
$document, $path )
Create visitor from RST document handler. |
|
protected void |
addStylesheets(
$head )
Add stylesheets to header |
|
public string |
escapeUrl(
$url )
Escape all special characters in URIs |
|
protected string |
generateFootnoteReferenceLink(
$name, $number )
Generate footnote reference link |
|
public mixed |
visit(
$ast )
Docarate RST AST |
|
protected void |
visitAnonymousReference(
$root, $node )
Visit anonomyous reference node |
|
protected void |
visitBlockquote(
$root, $node )
Visit blockquotes |
|
protected void |
visitBulletList(
$root, $node )
Visit bullet lists |
|
protected void |
visitComment(
$root, $node )
Visit comment |
|
protected void |
visitDefinitionListItem(
$root, $node )
Visit definition list item |
|
protected void |
visitDirective(
$root, $node )
Visit directive |
|
protected void |
visitEnumeratedList(
$root, $node )
Visit enumerated lists |
|
protected void |
visitExternalReference(
$root, $node )
Visit external reference node |
|
protected void |
visitFieldListItem(
$root, $node )
Visit field list item |
|
protected void |
visitFootnote(
$root, $node )
Visit footnote |
|
protected void |
visitInlineTarget(
$root, $node )
Visit inline target node |
|
protected void |
visitInternalFootnoteReference(
$root, $node )
Visit internal reference node |
|
protected void |
visitInterpretedTextNode(
$root, $node )
Visit interpreted text node markup |
|
protected void |
visitLineBlock(
$root, $node )
Visit line block |
|
protected void |
visitLineBlockLine(
$root, $node )
Visit line block line |
|
protected void |
visitNode(
$root, $node )
Visit single AST node |
|
protected void |
visitSection(
$root, $node )
Visit section node |
|
protected void |
visitTableCell(
$root, $node )
Visit table cell |
Inherited Methods
From
ezcDocumentRstVisitor :
Methods
__construct
Create visitor from RST document handler.
Parameters
Redefinition of
addStylesheets
void addStylesheets(
$head )
Add stylesheets to header
Parameters
| Name |
Type |
Description |
$head |
DOMElement |
|
escapeUrl
string escapeUrl(
string
$url )
Escape all special characters in URIs
Parameters
| Name |
Type |
Description |
$url |
string |
|
generateFootnoteReferenceLink
string generateFootnoteReferenceLink(
string
$name, string
$number )
Generate footnote reference link
Generate an internal target name out of the footnote name, which may contain special characters, which are not allowed for URL anchors and are converted to alphanumeric strings by this method.
Parameters
| Name |
Type |
Description |
$name |
string |
|
$number |
string |
|
visit
mixed visit(
$ast )
Docarate RST AST
Visit the RST abstract syntax tree.
Parameters
| Name |
Type |
Description |
$ast |
ezcDocumentRstDocumentNode |
|
Redefinition of
Redefined in descendants as
visitAnonymousReference
Visit anonomyous reference node
Parameters
visitBlockquote
Visit blockquotes
Parameters
visitBulletList
Visit bullet lists
Parameters
visitComment
Visit comment
Parameters
visitDefinitionListItem
Visit definition list item
Parameters
visitDirective
Visit directive
Parameters
visitEnumeratedList
Visit enumerated lists
Parameters
visitExternalReference
Visit external reference node
Parameters
visitFieldListItem
Visit field list item
Parameters
Redefined in descendants as
visitFootnote
Visit footnote
Parameters
visitInlineTarget
Visit inline target node
Parameters
visitInternalFootnoteReference
Visit internal reference node
Parameters
visitInterpretedTextNode
Visit interpreted text node markup
Parameters
visitLineBlock
Visit line block
Parameters
visitLineBlockLine
Visit line block line
Parameters
visitNode
Visit single AST node
Visit a single AST node, may be called for each node found anywhere as child. The current position in the DOMDocument is passed by a reference to the current DOMNode, which is operated on.
Parameters
visitSection
Visit section node
Parameters
Redefined in descendants as
visitTableCell
Visit table cell
Parameters
Last updated: Mon, 21 Dec 2009