Home / XSL / Style_Sheets

Style_Sheets

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 …

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 …

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 …

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> …

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 …

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. …

Read More »