por Daniel M. Germán (dmg@csg.uwaterloo.ca)
<xsl> <rule> <root/> <HTML> <BODY> <children/> </BODY> </HTML> </rule> <rule> <!-- patron -->! <target-element type="date"/> <!-- acción -->! <P color="blue" font-style="italic"> <children/> </P> </rule> </xsl>
<date>19 de Octubre de 1966</date>
<p color="blue" font-style="italic">19 de Octubre de 1966</p>
<?xml-stylesheet href="mi-estilo.xsl" type="text/xsl"?>
<import href="mi-estilo.xsl"/>
<rule> <target-element type="emph"/> <SPAN font-weight="bold"> <children/> </SPAN> </rule>
<rule> <target-element type="emph"/> <target-element type="strong"/> <SPAN font-weight="bold"> <children/> </SPAN> </rule>
<element type="chapter"> <element type="section"> <target-element type="title/> </element> </element>
<target-element type="table> <element type="title"/> </target-element>
<target-element type="employee"> <element type="exempt"/> <element type="high-paid"/> </target-element>
<rule> <root/> <HTML> <BODY> <children/> </BODY> </HTML> </rule>
<element type="appendix"> <any> <target-element type="para"> <any> <element-type="changed"> </any> </target-element> </any> </element>
<element type="data-samples"> <element> <target-element/> </element> </element>
<element type="list"> <attribute name="liststyle" value="enum"/> <target-element type="item"/> </element>
<element type="list"> <attribute name="compact" has-value="yes"/> <target-element type="item"/> </element>
<element type="lista"> <target-element type="item" position="first-of-type"/> </element>
<element type="lista"> <target-element type="item" only="of-type"/> </element>
<rule> <target-element type="chapter"/> <sequence> <horizontal-rule/> <paragraph space-before="2pt"> Chapter <eval>formatNumber(element.childNumber(), '001')</eval> : <children/> </paragraph> <horizontal-rule/> </sequence> </rule>
<rule> <target-element type="para"/> <DIV font-family="Courier" font-size="12pt" font-style="normal" text-align="justify" margin-top="10pt" margin-botton="6pt"> <children/> </DIV> </rule>
<rule> <target-element type="chapter"/> <display-group> <children/> </display-group> </rule>
<rule> <target-element type="chapter"/> <display-group> <select from="children"/> </display-group> </rule>
<rule> <target-element type="book"> <paragraph> <select from="descendents"> <target-element type="heading"/> </select> </paragraph> </rule>
<rule> <target-element type="product"/> <display-group> <table> <select from="descendants"> <element type="sales"> <target-element type="domestic"/> </element> </select> </table> <table> <select from="descendents"> <element type="sales"> <target-element type="foreign"/> </element> </select> </display-group> </rule>
<rule> <target-element type="employee"/> <paragraph> <select ancestor="department"/> <target-element="group"/> </select> </paragraph> </rule>
<define-macro name="warning-para"> <box> <paragraph> Warning! <contents/> </paragraph> </box> </define-macro> <rule> <target-element type="warning"> <warning-para> <children/> </warning-para> </rule>
<rule> <target-element/> <children/> </rule>
<style-rule> <target-element type="emph"/> <apply font-weight="bold"/> </style-rule>
h1 {font-weight: bold; color:blue} h1 strong {color:red}
<style-rule> <target-element type="h1"/> <apply font-weight="bold" color="blue"/> </style-rule> <style-rule> <element type="h1"/> <any> <target-element type="strong"/> </any> </element> <apply color="red"/> </style-rule>
<rule> <root/> <HTML> <BODY> <DIV name="table-of-contents"> <children mode="toc-mode"/> </DIV> <children/> </BODY> </HTML> </rule> <rule> <target-element type="title"/> <DIV font-size="14pt" font-weight="bold"> <children/> </DIV> </rule> <rule mode="toc-mode"> <target-element type="title"/> <DIV font-size="12pt"> <children/> </DIV> </rule>