[Home] [By Thread] [By Date] [Recent Entries]
On Aug 18, 2008, at 4:45 PM, Andrew Welch wrote:
I wrote: If you look back to my pastie, you'll see that I did want the notes inside the document, just after any other elements (divs, mostly) and all at the same level as any other content within the document. Here's what I ended up with, and it is working: <?xml version="1.0" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/ Transform"> <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes" /> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <xsl:template match="note" mode="notes"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <xsl:template match="note[@type !='margin' and @type != 'sourcenote']"/> <xsl:template match="document"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> <xsl:apply-templates select="//note[@type !='margin' and @type != 'sourcenote']" mode="notes"/> </xsl:copy> </xsl:template> </xsl:stylesheet> Thanks again very much for your help, you saved the day. Walter
|

Cart



