Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XSLT 2.0 space separated list type access with Saxon 9.1 -sa -val

From: RolfK <Rolf.Kemper@--.-----.--->
To: NULL
Date: 2/6/2009 4:28:00 AM
On 6 Feb., 12:59, Mukul Gandhi <gandhi.mu...@gmail.com> wrote:
> On Feb 6, 4:45=A0pm, RolfK <Rolf.Kem...@eu.necel.com> wrote:
>
> > My element in questions looks like this:
> > <Agenda CSSColorNames=3D"red =A0green"/>
> > Acessing the attribute and using tokenize() leads to an error.
> > How to access the nth element defined in the attribute
> > CSSColorNames ??
>
> I think, accessing the attribute and doing tokenize() is the right
> way. What error message are you getting?
>
>
>
> > Basically I imagine to do something like this to do this:
> > <xsl:variable select=3D"Agenda/@CSSColorNames[position()=3D2]"/>
>
> I think, this is not the correct way to do this.

Hello Mukul
The errror message is this:
 XPTY0004: A sequence of more than one item is not allowed as the
first argument of
  tokenize() ("red", "green")
Test lines are this ($VAgenda points to the Agende element):
<xsl:variable name=3D"vColorNames" select=3D"$vAgenda/@CSSColorNames"/>
<xsl:variable name=3D"vSeriesColor" select=3D"tokenize($vColorNames,'\s+')
[position()=3D2]"/>
<xsl:value-of select=3D"$vSeriesColor"/>

Thanks
Rolf


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent