Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: datatype >Thread Next - Re: datatype Re: datatypeTo: NULL Date: 7/3/2009 6:20:00 AM On Jul 3, 8:20=A0am, Martin Honnen <mahotr...@yahoo.de> wrote: > Larry Sulky wrote: > > Thanks, Martin. So I need to "cast" the tokenised values into the > > decimal datatype somehow? > > I did already suggest > > <xsl:variable name=3D"bboxWidth" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 as=3D"xs:decimal" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 select=3D"xs:decimal($bboxTokens[3]) = - > xs:decimal($bboxTokens[1])"/> > > where xs:decimal($bboxTokens[3]) casts the third item in the $bboxTokens > sequence to a decimal. > > -- > > =A0 =A0 =A0 =A0 Martin Honnen --- MVP XML > =A0 =A0 =A0 =A0http://msmvps.com/blogs/martin_honnen/ Oops, sorry, Martin, I didn't see it -- I was in a rush. Your suggestion didn't work at first. It gave me this error: "Type error, value does not match a required type as specified by the matching rules in 2.5.4 Sequence Type Matching. - 'xs:decimal' " But then I removed the as=3D attribute: <xsl:variable name=3D"bboxWidth" select=3D"xs:decimal($bboxTokens[3]) - xs:decimal($bboxTokens[1])"/> and then it worked perfectly. So I'm a little confused, but grateful! :-) Thanks! ----larry | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
