class Parser extends IRProcessor

Constants

XMLNS_XSL

XSL namespace

Properties

protected DOMXPath $xpath from  IRProcessor
protected Normalizer $normalizer

Methods

appendElement(DOMElement $parentNode, string $name, string $value = '')

Create and append an element to given node in the IR

void
createXPath(DOMDocument $dom)

Create and store an instance of DOMXPath for given document

mixed
evaluate(string $expr, DOMNode $node = null)

Evaluate an XPath expression and return its result

query(string $query, DOMNode $node = null)

Run an XPath query and return its result

void
__construct(Normalizer $normalizer)

No description

parse(string $template)

Parse a template into an internal representation

void
appendAVT(DOMElement $parentNode, string $avt)

Append elements corresponding to given AVT

void
appendLiteralOutput(DOMElement $parentNode, string $content)

Append an element with literal content to given node

void
appendConditionalAttributes(DOMElement $parentNode, string $expr)

Append the structure for a element to given node

void
appendXPathOutput(DOMElement $parentNode, string $expr)

Append an element for given XPath expression to given node

void
parseChildren(DOMElement $ir, DOMElement $parent)

Parse all the children of a given element

void
parseNode(DOMElement $ir, DOMElement $node)

Parse a given node into the internal representation

void
parseXslApplyTemplates(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

void
parseXslAttribute(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

void
parseXslChoose(DOMElement $ir, DOMElement $node)

Parse an node and its and children into the internal representation

void
parseXslComment(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

void
parseXslCopyOf(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

void
parseXslElement(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

void
parseXslIf(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

void
parseXslText(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

void
parseXslValueOf(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

Details

in IRProcessor at line 35
protected DOMElement appendElement(DOMElement $parentNode, string $name, string $value = '')

Create and append an element to given node in the IR

Parameters

DOMElement $parentNode

Parent node of the element

string $name

Tag name of the element

string $value

Value of the element

Return Value

DOMElement

The created element

in IRProcessor at line 46
protected void createXPath(DOMDocument $dom)

Create and store an instance of DOMXPath for given document

Parameters

DOMDocument $dom

Return Value

void

in IRProcessor at line 58
protected mixed evaluate(string $expr, DOMNode $node = null)

Evaluate an XPath expression and return its result

Parameters

string $expr

XPath expression

DOMNode $node

Context node

Return Value

mixed

in IRProcessor at line 70
protected DOMNodeList query(string $query, DOMNode $node = null)

Run an XPath query and return its result

Parameters

string $query

XPath query

DOMNode $node

Context node

Return Value

DOMNodeList

at line 28
void __construct(Normalizer $normalizer)

No description

Parameters

Normalizer $normalizer

Return Value

void

at line 39
DOMDocument parse(string $template)

Parse a template into an internal representation

Parameters

string $template

Source template

Return Value

DOMDocument

Internal representation

at line 60
protected void appendAVT(DOMElement $parentNode, string $avt)

Append elements corresponding to given AVT

Parameters

DOMElement $parentNode

Parent node

string $avt

Attribute value template

Return Value

void

at line 82
protected void appendLiteralOutput(DOMElement $parentNode, string $content)

Append an element with literal content to given node

Parameters

DOMElement $parentNode

Parent node

string $content

Content to output

Return Value

void

at line 100
protected void appendConditionalAttributes(DOMElement $parentNode, string $expr)

Append the structure for a element to given node

Parameters

DOMElement $parentNode

Parent node

string $expr

Select expression, which is should only contain attributes

Return Value

void

at line 126
protected void appendXPathOutput(DOMElement $parentNode, string $expr)

Append an element for given XPath expression to given node

Parameters

DOMElement $parentNode

Parent node

string $expr

XPath expression

Return Value

void

at line 139
protected void parseChildren(DOMElement $ir, DOMElement $parent)

Parse all the children of a given element

Parameters

DOMElement $ir

Node in the internal representation that represents the parent node

DOMElement $parent

Parent node

Return Value

void

at line 173
protected void parseNode(DOMElement $ir, DOMElement $node)

Parse a given node into the internal representation

Parameters

DOMElement $ir

Node in the internal representation that represents the node's parent

DOMElement $node

Node to parse

Return Value

void

at line 224
protected void parseXslApplyTemplates(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

Parameters

DOMElement $ir

Node in the internal representation that represents the node's parent

DOMElement $node

node

Return Value

void

at line 240
protected void parseXslAttribute(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

Parameters

DOMElement $ir

Node in the internal representation that represents the node's parent

DOMElement $node

node

Return Value

void

at line 255
protected void parseXslChoose(DOMElement $ir, DOMElement $node)

Parse an node and its and children into the internal representation

Parameters

DOMElement $ir

Node in the internal representation that represents the node's parent

DOMElement $node

node

Return Value

void

at line 284
protected void parseXslComment(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

Parameters

DOMElement $ir

Node in the internal representation that represents the node's parent

DOMElement $node

node

Return Value

void

at line 299
protected void parseXslCopyOf(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

NOTE: only attributes are supported

Parameters

DOMElement $ir

Node in the internal representation that represents the node's parent

DOMElement $node

node

Return Value

void

at line 325
protected void parseXslElement(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

Parameters

DOMElement $ir

Node in the internal representation that represents the node's parent

DOMElement $node

node

Return Value

void

at line 339
protected void parseXslIf(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

Parameters

DOMElement $ir

Node in the internal representation that represents the node's parent

DOMElement $node

node

Return Value

void

at line 357
protected void parseXslText(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

Parameters

DOMElement $ir

Node in the internal representation that represents the node's parent

DOMElement $node

node

Return Value

void

at line 373
protected void parseXslValueOf(DOMElement $ir, DOMElement $node)

Parse an node into the internal representation

Parameters

DOMElement $ir

Node in the internal representation that represents the node's parent

DOMElement $node

node

Return Value

void