RE: [xsl] tokenize function

Subject: RE: [xsl] tokenize function
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Thu, 10 Jun 2004 12:29:00 +0100
> 
> hello,
> I want know how can I use the tokenize function of xslt 
> 2.0,and what namespace must I declare.

You don't need to declare any namespace to use functions in the core library
from XSLT. In XSLT, the namespace containing these functions is selected
automatically when you use an unprefixed function name. (There may be other
environments in future that use XPath with a different default function
library - hence the namespace).

> I use xmlspy to validate my xsl file, but I have always an 
> error with the follow line. can you help me to correct it.
> <xsl:value-of select= 
> "fn:tokenize(*/gml:boundedBy/gml:Box/gml:coord, " \ s * " )" />
> Thank you advanced.

As others pointed out, XMLSpy doesn't itself have an XSLT 2.0 processor. It
does allow you to invoke Saxon 7.x as an external processor, but XMLSpy
isn't then (as far as I know) doing any validation.

Also note that if you enclose the select attribute in double quotes, then
any string literals within the XPath expression must be in single quotes.

Michael Kay



Current Thread