diff options
Diffstat (limited to 'tools/xml-notes-limit.xsl')
-rw-r--r-- | tools/xml-notes-limit.xsl | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/xml-notes-limit.xsl b/tools/xml-notes-limit.xsl new file mode 100644 index 0000000..149cbd9 --- /dev/null +++ b/tools/xml-notes-limit.xsl @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + <xsl:output method="xml" indent="yes"/> + <xsl:param name="number" /> + + <xsl:template match="notes"> + <xsl:copy> + <xsl:copy-of select="@*" /> + <xsl:apply-templates select="note[position()<=$number]" /> + </xsl:copy> + </xsl:template> + + <xsl:template match="node()" priority="0"> + <xsl:copy> + <xsl:copy-of select="@*" /> + <xsl:apply-templates /> + </xsl:copy> + </xsl:template> + +</xsl:stylesheet> |