1<?xml version="1.0"?> 2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 3 4 <xsl:output method="html" indent="yes"/> 5 6 <xsl:template match="html"> 7 <qt> 8 <xsl:attribute name="title"><xsl:value-of select="normalize-space(head/title)"/></xsl:attribute> 9 <xsl:apply-templates select="node()"/> 10 </qt> 11 </xsl:template> 12 13 <xsl:template match="head"> 14 </xsl:template> 15 16 <xsl:template match="body"> 17 <xsl:apply-templates select="node()"/> 18 </xsl:template> 19 20 <xsl:template match="h1"> 21 <xsl:copy> 22 <xsl:apply-templates select="@*|node()"/> 23 </xsl:copy> 24 <p>Version: <xsl:value-of select="$version"/></p> 25 </xsl:template> 26 27 <xsl:template match="a[@href]"> 28 <xsl:choose> 29 <xsl:when test="starts-with(@href,'http:')"> 30 <xsl:apply-templates select="node()"/> 31 (see <xsl:value-of select="string(@href)"/>) 32 </xsl:when> 33 <xsl:otherwise> 34 <xsl:copy> 35 <xsl:apply-templates select="@*|node()"/> 36 </xsl:copy> 37 </xsl:otherwise> 38 </xsl:choose> 39 </xsl:template> 40 41 <xsl:template match="@*|node()"> 42 <xsl:copy> 43 <xsl:apply-templates select="@*|node()"/> 44 </xsl:copy> 45 </xsl:template> 46 47</xsl:stylesheet> 48