TemplateHelper
abstract class TemplateHelper
Constants
XMLNS_XSL |
XSL namespace |
Methods
Return a list of parameters in use in given XSL
Highlight the source of a node inside of a template
Replace simple templates (in an array, in-place) with a common template
Get a list of parameters from given XPath expression
Details
at line 32
static array
getParametersFromXSL(string $xsl)
Return a list of parameters in use in given XSL
at line 73
static string
highlightNode(DOMNode $node, string $prepend, string $append)
Highlight the source of a node inside of a template
at line 128
static void
replaceHomogeneousTemplates(array $templates, int $minCount = 3)
Replace simple templates (in an array, in-place) with a common template
In some situations, renderers can take advantage of multiple tags having the same template. In any configuration, there's almost always a number of "simple" tags that are rendered as an HTML element of the same name with no HTML attributes. For instance, the system tag "p" used for paragraphs, "B" tags used for "b" HTML elements, etc... This method replaces those templates with a common template that uses a dynamic element name based on the tag's name, either its nodeName or localName depending on whether the tag is namespaced, and normalized to lowercase using XPath's translate() function
at line 183
static protected string[]
getParametersFromExpression(DOMNode $node, string $expr)
Get a list of parameters from given XPath expression