|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: xsl:param xsl:copy-of
Hi,
> If I have a structure like -
>
> <xxx>
> <a>
> <b>
> <c>
> </xxx>
>
> in a vairiable X1 can I do the follwing -
>
> <xsl:call-template>
> <xsl:with-param name="X1" select="$X1(not(position() =
> 1))" />
> </xsl:call-template>
>
> to get -
>
> <xxx>
> <b>
> <c>
> </xxx>
>
> for the next iteration?
Unless you use exslt:node-set or XSLT 1.1/2.0, you can't modify the node-set. You should consider passing the node-set $X1 as such, and have another parameter to define the index of the containing element to be processed, i.e.
<xsl:template name="foo">
<xsl:param name="X1" select="/.." />
<xsl:param name="index" select="1" />
<xsl:if test="$i <= count($X1/*)">
<xsl:for-each select="$X1/*[position() = $index]">
...
</xsl:for-each>
<xsl:call-template name="foo">
<xsl:with-param name="X1" select="$X1" />
<xsl:with-param name="index" select="$index + 1" />
</xsl:call-template>
</xsl:if>
</xsl:template>
Or you can pass
<a />
<b />
<c />
(no wrapper element) and when recursing, pass if forwars with select="$X1[not(position() = 1)]". Did that make any sense to you?
Cheers,
Jarno - VNV Nation: Fallout
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








