Subject: Re: [xsl] function returning string with string-join() From: ac <ac@xxxxxxxxxxxxx> Date: Fri, 06 Aug 2010 08:37:42 -0400 |
Cheers, ac
Am 06.08.2010 um 11:15 schrieb Andrew Welch:
When returning atomics (such as xs:string) you should use xs:sequenceThanks for that reminder... xsl:for-each-group and regular expressions are well settled in my XSLT2 mind-set, but xsl:sequence is more or less ignored.
and not xsl:value-of, as value-of will create a text node that then
gets "atomized" to an atomic.
If you didnt have the xsl:message call you could do:Yes, if...
<xsl:function name="my:filename" as="xs:string">
<xsl:param name="input" as="xs:integer" />
<xsl:sequence select="concat(if ($input = (1,2)) then ('NO1',
'NO2')[$input] else 'NOx', '.html')"/>
</xsl:function>
I still try to find the best balance between writing some complex, possibly hard to debug multi-line XPath expressions or a tree of XSLT elements. Haven't found a general rule for that, and maybe there isn't.
Thanks a lot,
- Michael
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] function returning string, Michael Müller-Hille | Thread | Re: [xsl] function returning string, Dimitre Novatchev |
Re: [xsl] question about generate-i, ac | Date | Re: [xsl] function returning string, Dimitre Novatchev |
Month |