|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: concatenation of sibling names
> <xsl:template match="db/*">
> <xsl:for-each select="previous-sibling::*">
> <xsl:value-of select="name()"/>
> <xsl:text> </xsl:text>
> </xsl:for-each>
> <xsl:for-each select="following-sibling::*">
> <xsl:value-of select="name()"/>
> <xsl:text> </xsl:text>
> </xsl:for-each>
> </xsl:template>
> Yes, both solutions presented so far on the list are fine, but as
> I said in my original post I am interested in storing the results
> of the concatenation in a parameter to use later in an XPath expression
> [as opossed to just simply outputting it].
>
> Is that feasible with <xsl:param>?
<xsl:template match="db/*">
<xsl:param name="param">
<xsl:for-each select="previous-sibling::* | following-sibling::*">
<xsl:value-of select="concat(name(),' ')"/>
</xsl:for-each>
</xsl:param>
<xsl:value-of select="$param"/>
</xsl:template>
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








