Subject: Re: [xsl] sequence of strings From: Ruud Grosmann <r.grosmann@xxxxxx> Date: Tue, 02 Dec 2008 15:20:04 +0100 |
I would tend to write that as
<xsl:function name="get-attributes" as="xs:string*"> <xsl:param name="string" as="xs:string"/> <xsl:sequence select="'BLD'[contains($string, 'bold')], 'ITA'[contains($string, 'italic')]"/> </xsl:function>
or if it were a longer list of names then
<xsl:variable name="styles" as="element(style)"> <style name="BLD" code="bold"/> <style name="ITA" code="italic"/> </xsl:variable>
<xsl:function name="get-attributes" as="xs:string*">
<xsl:param name="string" as="xs:string"/>
<xsl:sequence select="$styles[contains($string, @code)]/@name"/>
</xsl:function>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] sequence of strings, Michael Kay | Thread | Re: [xsl] sequence of strings, Florent Georges |
Re: [xsl] sequence of strings, Florent Georges | Date | Re: [xsl] sequence of strings, Florent Georges |
Month |