RE: Inserting a separator only between non-empty strin
> I tried > > <xsl:variable name="result"> > <xsl:value-of separator="|"> > <xsl:value-of select="$a"/> > <xsl:value-of select="$b"/> > <xsl:value-of select="$c"/> > </xsl:value-of> > </xsl:variable> > > but this does never insert a separator. That's because of the rules for construction of simple content http://www.w3.org/TR/xslt20/#constructing-simple-content which say that adjacent text nodes are concatenated in step 2, before atomization and insertion of separators. (This is necesary so that instructions like xsl:attribute work the way they did in XSLT 1.0). Suggestion: <xsl:variable name="result" select="string-join((string($a), string($b), string($c))[.], '|')"/> Michael Kay http://www.saxonica.com/ Replacing > xsl:value-of with xsl:sequence for the variable references > always inserts the separator, even near empty strings which > is what I want to avoid. > > Yves
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