RE: [xsl] Modify XML using XSL

Subject: RE: [xsl] Modify XML using XSL
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 13 Apr 2006 10:21:51 +0100
> <xsl:template match="/books/nobel[count(/title) &lt; 2]">

You don't want "/title" here, you want "title". Using "/" searches from the
root of the tree.
> 
> 
> <xsl:template match="/books/comics[count(/title) &gt; 1]">

Same applies here.

> <xsl:copy>
> 
> <xsl:copy-of select="@*"/>
> 
> <xsl:apply-templates select="/title[position() != last()]"/>

and here.

Michael Kay
http://www.saxonica.com/

Current Thread