- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Mon, 12 May 2003 14:20:38 +0100
- To: David.Pawson@rnib.org.uk
- CC: public-qt-comments@w3.org
Hi Dave,
> This draft contains:
>
> <xsl:copy-of
> select = expression
> copy-namespaces = "yes" | "no"
> validation = "strict" | "lax" | "preserve" | "strip"
> type = qname />
>
> In the previous draft the separator attribute was present.
>
> In generating a pipe separated list in XSLT with text method output,
> I found that attribute very useful.
>
> What alternative replaces it please?
> If none,
> what was the justification for its removal?
Since you're using the text output method, and thus only interested in
generating text nodes, the <xsl:value-of> element should give you what
you want:
<xsl:value-of select="$sequence" separator="|" />
In all other cases, you can use exactly the same code as you can in
XSLT 1.0, namely:
<xsl:for-each select="$sequence">
<xsl:copy-of select="." />
<xsl:if test="position() != last()">|</xsl:if>
</xsl:for-each>
We removed the separator attribute from <xsl:copy-of> mainly because
it doesn't play well with the fact that <xsl:copy-of> can now generate
sequences of atomic values.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
Received on Monday, 12 May 2003 09:20:47 UTC