home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
-
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
-
- <!-- Root xsl:template - start processing here -->
- <xsl:template match="/">
- <HTML>
- <HEAD>
- <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
- <META http-equiv="Expires" content="0"/>
- </HEAD>
- <BODY>
- <H1>General funky test</H1>
- <xsl:apply-templates/>
- </BODY>
- </HTML>
- </xsl:template>
-
- <xsl:template match="doc/*" priority="1">
- <HR/>
- Rule1(<xsl:apply-templates/>)
- </xsl:template>
-
- <xsl:template match="*" priority="-1">
- Rule2(<xsl:apply-templates/>)
- </xsl:template>
-
- <xsl:template match="emph">
- Rule3(<EM><SPAN style="color:black">match="emph": </SPAN><xsl:apply-templates/></EM>)
- </xsl:template>
-
- <xsl:template match="b//b2/emph" priority="1">
- Rule4(<EM style="background-color:purple"><SPAN style="color:black">match="b//b2/emph": </SPAN>
- <xsl:apply-templates/></EM>)
- </xsl:template>
-
- <xsl:template match="a">
- Rule5(<P style="color:blue"><EM style="color:black">match="a": </EM><xsl:apply-templates/></P>)
- </xsl:template>
-
- <xsl:template match="a[emph]">
- Rule6(<P style="color:blue; background-color:red"><EM style="color:black">match="a[emph]": </EM>
- <xsl:apply-templates/></P>)
- </xsl:template>
-
- <xsl:template match="c/a[emph]" priority="1">
- Rule7(<P style="color:blue; background-color:gray"><EM style="color:black">match="c/a[emph]":
- </EM><xsl:apply-templates/></P>)
- </xsl:template>
-
- <xsl:template match="a[@test='true']" priority="2">
- Rule8(<P style="color:green"><EM style="color:black">match="a[@test='true']":
- </EM><xsl:apply-templates/></P>)
- </xsl:template>
-
- <xsl:template match="c/a" priority=".5">
- Rule9(<P style="color:purple"><EM style="color:black">match="c/a":
- </EM><xsl:apply-templates/></P>)
- </xsl:template>
-
- <xsl:template match="c/a[@test='true' and first-of-type()]" priority="3">
- Rule10(<P style="color:yellow"><EM style="color:black">match="c/a[@test='true', first-of-type()]":
- </EM><xsl:apply-templates/></P>)
- </xsl:template>
-
- </xsl:stylesheet>
-