|
Subject: RE: [xsl] collect elements into variable and apply-templates From: cknell@xxxxxxxxxx Date: Thu, 19 Feb 2004 15:03:40 -0500 |
Investigate your XSLT processor's node set extension (called "node-set()" or "nodeset()", depending on the processor).
--
Charles Knell
cknell@xxxxxxxxxx - email
-----Original Message-----
From: Rui Alberto L. Gon硬ves <rui-l-goncalves@xxxxxxxxxxxxx>
Sent: 19 Feb 2004 19:50:31 +0000
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] collect elements into variable and apply-templates
Hi,
I need to collect some elements from a document into a
variable and then apply-templates the the resulting variable:
Example:
XSL
== <xsl:template match="doc">
<xsl:variable name="a">
<xsl:for-each select="xxx/*">
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:variable>
<!-- ILLEGAL -->
<xsl:apply-templates select="$a"/>
</xsl:template>
XML
== <doc>
<xxx>
<item> test1 </item>
</xxx>
<xxx>
<item>test5</item>
</xxx>
</doc>
this results in:
(Location of error unknown)XSLT Error (org.apache.xpath.XPathException):
Can not convert #RTREEFRAG to a NodeList!
Does anyone have an idea how can I solve this problem?
thanks for any help.
Rui
--
Rui Alberto L. Gonçalves <rui-l-goncalves@xxxxxxxxxxxxx>
PT Inovação
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] collect elements into va, David Carlisle | Thread | [xsl] Selecting and printing certai, Glenn MacGregor |
| [xsl] Re: Counting nodes efficientl, Dimitre Novatchev | Date | Re: [xsl] XSL SUM BUG?, G. Ken Holman |
| Month |