File: Data.xml
<HTML>
<Head>
<TITLE>This is a mixed-case HTML-like XML document</TITLE>
</Head>
<Body>
<p>
Some
<I>HTML</I>
paragraph
</p>
<data>
<record>one</record>
<record>two</record>
</data>
<UL>
<LI>alpha</LI>
<LI>beta</LI>
<Li>gamma</Li>
</UL>
</Body>
</HTML>
File: Transform.xslt
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:strip-space elements="head body" />
<xsl:template
match="html | head | title | body | p | ul | li | b | i"
priority="2">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
<xsl:template match="*" priority="1" />
</xsl:stylesheet>
|