|
Subject: Re: [xsl] Re: Grouping by attribute From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Wed, 21 Oct 2009 17:22:37 +0200 |
I am using xmlspy for testing with the built in xslt engine which said that it is not a node item. And in java: Exception dropped during XSLT transformation: net.sf.saxon.trans.DynamicError: Required item type of second operand of 'intersect' is node(); supplied value has item type xs:string
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xsd">
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@*, node()"/>
</xsl:copy>
</xsl:template> <xsl:template match="node()" mode="m1">
<xsl:param name="cn"/>
<xsl:if test="descendant-or-self::node() intersect $cn">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="node()" mode="m1">
<xsl:with-param name="cn" select="$cn"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:if>
</xsl:template>Martin Honnen http://msmvps.com/blogs/martin_honnen/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Re: Grouping by attribute, Lajos Joo | Thread | Re: [xsl] Re: Grouping by attribute, Lajos Joo |
| Re: [xsl] Re: Grouping by attribute, Florent Georges | Date | [xsl] Sort by page number, Jostein Austvik Jaco |
| Month |