Breaking News


Applying Style

Applying Style One model for applying style is to allow the process to run recursively, driven primarily by the document. A series of templates is created, such that there is a template to match each …

Read More »

Conflict Resolution

Conflict Resolution The problem of multiple patterns that match is handled by conflict resolution: • Matching templates from imported modules are not considered if there is a matching template in the current module • Matching …

Read More »

Applying Style Procedurally

Applying Style Procedurally The other model for applying style is to select each action procedurally. A series of templates is created, such that each template explicitly selects and processes the necessary elements. • <xsl:for-each> <xsl:for-each …

Read More »

Named Template Example

Named Template Example namedtemplate.xml <?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet type="text/xsl" href="named_temp_example.xsl"?> <chapter> <warning> <para>Using a damaged extension cord may cause a fire.</para> </warning> <caution> <para>Freshly brewed coffee is hot.</para> </caution> </chapter> namedtemplate.xsl <xsl:stylesheet version="1.0" xmlns:xsl=""> <xsl:output …

Read More »

Creating the Result Tree

Creating the Result Tree Literal Result Elements Any element in a template rule that is not in the XSL (or other extension) namespace is copied literally to the result tree <xsl:text> The content of <xsl:text> …

Read More »

Conditional Processing

Conditional Processing The xsl:if element evaluates an expression which returns a Boolean result to determine if a template should be instantiated. The evaluation is a simple True or False test on a defined condition or a set of conditions. If the test returns True, …

Read More »