![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: XSLT 2.0 space separated list type access with Saxon 9.1 -sa -val [Thread Next] Re: XSLT 2.0 space separated list type access with Saxon 9.1 -sa -valTo: 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
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||
|
