Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcDocumentRstDocbookVisitor

Document::ezcDocumentRstDocbookVisitor

Class ezcDocumentRstDocbookVisitor

Docbook visitor for the RST AST.

Source for this file: /Document/src/document/rst/visitor/docbook.php

ezcDocumentRstVisitor
   |
   --ezcDocumentRstDocbookVisitor
Version:   //autogen//

Inherited Constants

From ezcDocumentRstVisitor:
ezcDocumentRstVisitor::DUBLICATE    Duplicate reference target. Will throw an error on use.
ezcDocumentRstVisitor::UNUSED    Unused reference target
ezcDocumentRstVisitor::USED    Used reference target

Member Variables

protected array $complexVisitMapping = array(
'ezcDocumentRstSectionNode' => 'visitSection',
'ezcDocumentRstParagraphNode' => 'visitParagraph',
'ezcDocumentRstTextLineNode' => 'visitText',
'ezcDocumentRstLiteralNode' => 'visitText',
'ezcDocumentRstExternalReferenceNode' => 'visitExternalReference',
'ezcDocumentRstReferenceNode' => 'visitInternalFootnoteReference',
'ezcDocumentRstAnonymousLinkNode' => 'visitAnonymousReference',
'ezcDocumentRstMarkupSubstitutionNode' => 'visitSubstitutionReference',
'ezcDocumentRstMarkupInterpretedTextNode' => 'visitInterpretedTextNode',
'ezcDocumentRstMarkupStrongEmphasisNode' => 'visitEmphasisMarkup',
'ezcDocumentRstMarkupEmphasisNode' => 'visitEmphasisMarkup',
'ezcDocumentRstTargetNode' => 'visitInlineTarget',
'ezcDocumentRstBlockquoteNode' => 'visitBlockquote',
'ezcDocumentRstEnumeratedListListNode' => 'visitEnumeratedList',
'ezcDocumentRstDefinitionListNode' => 'visitDefinitionListItem',
'ezcDocumentRstTableNode' => 'visitTable',
'ezcDocumentRstTableCellNode' => 'visitTableCell',
'ezcDocumentRstFieldListNode' => 'visitFieldListItem',
'ezcDocumentRstLineBlockNode' => 'visitLineBlock',
'ezcDocumentRstLineBlockLineNode' => 'visitChildren',
'ezcDocumentRstDirectiveNode' => 'visitDirective',
)

Mapping of class names to internal visitors for the respective nodes.
protected DOMDocument $document
DOM document
protected array $simpleVisitMapping = array(
'ezcDocumentRstMarkupInlineLiteralNode' => 'literal',
'ezcDocumentRstBulletListListNode' => 'itemizedlist',
'ezcDocumentRstDefinitionListListNode' => 'variablelist',
'ezcDocumentRstBulletListNode' => 'listitem',
'ezcDocumentRstEnumeratedListNode' => 'listitem',
'ezcDocumentRstLiteralBlockNode' => 'literallayout',
'ezcDocumentRstCommentNode' => 'comment',
'ezcDocumentRstTransitionNode' => 'beginpage',
'ezcDocumentRstTableHeadNode' => 'thead',
'ezcDocumentRstTableBodyNode' => 'tbody',
'ezcDocumentRstTableRowNode' => 'row',
)

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
protected ezcDocumentRstVisitor::$anonymousReferenceCounter
protected ezcDocumentRstVisitor::$anonymousReferences
protected ezcDocumentRstVisitor::$ast
protected ezcDocumentRstVisitor::$errors
protected ezcDocumentRstVisitor::$footnoteCounter
protected ezcDocumentRstVisitor::$footnotes
protected ezcDocumentRstVisitor::$footnoteSymbols
protected ezcDocumentRstVisitor::$namedExternalReferences
protected ezcDocumentRstVisitor::$path
protected ezcDocumentRstVisitor::$referenceCounter
protected ezcDocumentRstVisitor::$references
protected ezcDocumentRstVisitor::$rst
protected ezcDocumentRstVisitor::$substitutions
protected ezcDocumentRstVisitor::$usedIDs

Method Summary

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 visitChildren( $root , $node )
Visit children
protected void visitCitation( $root , $node )
Visit citation
protected void visitDefinitionListItem( $root , $node )
Visit definition list item
protected void visitDirective( $root , $node )
Visit directive
protected void visitEmphasisMarkup( $root , $node )
Visit emphasis markup
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 visitNode( $root , $node )
Visit single AST node
protected void visitParagraph( $root , $node )
Visit paragraph node
protected void visitSection( $root , $node )
Visit section node
protected void visitSubstitutionReference( $root , $node )
Visit substitution reference node
protected void visitTable( $root , $node )
Visit table
protected void visitTableCell( $root , $node )
Visit table cell
protected void visitText( $root , $node )
Visit text node

Inherited Methods

From ezcDocumentRstVisitor
public void ezcDocumentRstVisitor::__construct()
Create visitor from RST document handler.
protected void ezcDocumentRstVisitor::addFootnote()
Add footnote
protected void ezcDocumentRstVisitor::aggregateListItems()
Aggregate list items
protected string ezcDocumentRstVisitor::calculateId()
Get a valid identifier string
protected string ezcDocumentRstVisitor::calculateUniqueId()
Calculate unique ID
protected bool ezcDocumentRstVisitor::compareListType()
Compare two list items
public string ezcDocumentRstVisitor::getAnonymousReferenceTarget()
Get anonymous reference target
public array ezcDocumentRstVisitor::getErrors()
Return list of errors occured during visiting the document.
public string ezcDocumentRstVisitor::getNamedExternalReference()
Return named external reference target
public ezcDocumentRstFootnoteNode ezcDocumentRstVisitor::hasFootnoteTarget()
Check for internal footnote reference target
public string ezcDocumentRstVisitor::hasReferenceTarget()
Check for internal reference target
public string ezcDocumentRstVisitor::nodeToString()
Transform a node tree into a string
protected void ezcDocumentRstVisitor::preProcessAst()
Pre process AST
protected void ezcDocumentRstVisitor::substitute()
Get substitution contents
protected string ezcDocumentRstVisitor::tokenListToString()
Get string from token list.
public void ezcDocumentRstVisitor::triggerError()
Trigger visitor error
public mixed ezcDocumentRstVisitor::visit()
Docarate RST AST
protected void ezcDocumentRstVisitor::visitChildren()
Visit children
protected void ezcDocumentRstVisitor::visitSubstitutionReference()
Visit substitution reference node
protected void ezcDocumentRstVisitor::visitText()
Visit text node

Methods

visit

mixed visit( $ast )

Docarate RST AST

Visit the RST abstract syntax tree.

Parameters:
Name Type Description
$ast ezcDocumentRstDocumentNode
Redefinition of:
Method Description
ezcDocumentRstVisitor::visit() Docarate RST AST

visitAnonymousReference

void visitAnonymousReference( $root , ezcDocumentRstNode $node )

Visit anonomyous reference node

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitBlockquote

void visitBlockquote( $root , ezcDocumentRstNode $node )

Visit blockquotes

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitChildren

void visitChildren( $root , ezcDocumentRstNode $node )

Visit children

Just recurse into node and visit its children, ignoring the actual node.

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode
Redefinition of:
Method Description
ezcDocumentRstVisitor::visitChildren() Visit children

visitCitation

void visitCitation( $root , ezcDocumentRstNode $node )

Visit citation

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitDefinitionListItem

void visitDefinitionListItem( $root , ezcDocumentRstNode $node )

Visit definition list item

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitDirective

void visitDirective( $root , ezcDocumentRstNode $node )

Visit directive

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitEmphasisMarkup

void visitEmphasisMarkup( $root , ezcDocumentRstNode $node )

Visit emphasis markup

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitEnumeratedList

void visitEnumeratedList( $root , ezcDocumentRstNode $node )

Visit enumerated lists

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitExternalReference

void visitExternalReference( $root , ezcDocumentRstNode $node )

Visit external reference node

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitFieldListItem

void visitFieldListItem( $root , ezcDocumentRstNode $node )

Visit field list item

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitFootnote

void visitFootnote( $root , ezcDocumentRstNode $node )

Visit footnote

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitInlineTarget

void visitInlineTarget( $root , ezcDocumentRstNode $node )

Visit inline target node

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitInternalFootnoteReference

void visitInternalFootnoteReference( $root , ezcDocumentRstNode $node )

Visit internal reference node

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitInterpretedTextNode

void visitInterpretedTextNode( $root , ezcDocumentRstNode $node )

Visit interpreted text node markup

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitLineBlock

void visitLineBlock( $root , ezcDocumentRstNode $node )

Visit line block

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitNode

void visitNode( $root , ezcDocumentRstNode $node )

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:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitParagraph

void visitParagraph( $root , ezcDocumentRstNode $node )

Visit paragraph node

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitSection

void visitSection( $root , ezcDocumentRstNode $node )

Visit section node

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitSubstitutionReference

void visitSubstitutionReference( $root , ezcDocumentRstNode $node )

Visit substitution reference node

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode
Redefinition of:
Method Description
ezcDocumentRstVisitor::visitSubstitutionReference() Visit substitution reference node

visitTable

void visitTable( $root , ezcDocumentRstNode $node )

Visit table

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitTableCell

void visitTableCell( $root , ezcDocumentRstNode $node )

Visit table cell

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode

visitText

void visitText( $root , ezcDocumentRstNode $node )

Visit text node

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentRstNode
Redefinition of:
Method Description
ezcDocumentRstVisitor::visitText() Visit text node
Documentation generated by phpDocumentor 1.4.3