comma separated list of attributes
I want to convert a list of attributes to a comma-separated list
a variable $choiceNode contains a tree fragment:
<xsd:choice maxOccurs="unbounded">
<xsd:element ref="referential"/>
<xsd:element ref="temporal"/>
<xsd:element ref="privacy"/>
</xsd:choice>
when i use the syntax:
<xsl:value-of select="string-join($choiceNode/node()/xsd:element/string(@ref),',')"/>
the output is "referential,temporal,privacy"
but when i want to put this in a variable, the variable stays empty. How come???????
I use the syntax:
<xsl:variable name="choicelist" select="string-join($choiceNode/node()/xsd:element/string(@ref),',')"/>
or
<xsl:variable name="choicelist">
<xsl:value-of select="string-join($choiceNode/node()/xsd:element/string(@ref),',')"/></xsl:variable>
The debugger in oxygen displays the value but doesn't recognise it as a string
even this doesn't return a variable with a value:
<xsl:variable name="choiceList" select="string-join(('a','b'),'|')" />
when using
<xsl:value-of select="string-join(('a','b'),'|')"/> this returns "a,b" but I can't seem to fill the variable with this value
|