Discussion:
"'tokenize' is not a valid XSLT or XPath function."
Steve
2006-06-22 22:03:55 UTC
Permalink
<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="placementToken" select="tokenize('1-2-3','-')" />

<xsl:variable name="placementMM" select="item-at($placementToken,0)" />
<xsl:variable name="placementDD" select="item-at($placementToken,1)" />
<xsl:variable name="placementYYYY" select="item-at($placementToken,2)" />

-----

Before I begin tinkering with MSXML installation, is there something
I'm not seeing?

-Steve

--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
Colin Paul Adams
2006-06-23 05:45:36 UTC
Permalink
Steve> <?xml version='1.0' encoding="UTF-8"?> <xsl:stylesheet
Steve> version="2.0"
Steve> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
Steve> <xsl:variable name="placementToken"
Steve> select="tokenize('1-2-3','-')" />

Steve> <xsl:variable name="placementMM"
Steve> select="item-at($placementToken,0)" /> <xsl:variable
Steve> name="placementDD" select="item-at($placementToken,1)" />
Steve> <xsl:variable name="placementYYYY"
Steve> select="item-at($placementToken,2)" />

Steve> -----

Steve> Before I begin tinkering with MSXML installation, is there
Steve> something I'm not seeing?

MSXSL does not support XSLT 2.0.
--
Colin Adams
Preston Lancashire

--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
Kamal Bhatt
2006-06-23 05:49:24 UTC
Permalink
Don't know if MSXSL supports exslt, but exslt supports tokenize, try to
use that:


http://www.exslt.org/str/functions/tokenize/index.html
--
Kamal Bhatt


--
Disclaimer: This email is confidential and may contain privileged information for the sole use of the person or business to which it is addressed. If you are not the intended recipient, please notify the sender by return e-mail or phone as you must not view, disseminate, distribute or copy this email without our consent. We do not accept any liability in connection with any computer virus, data corruption, incompleteness, or unauthorised amendment of this email. It is the sole responsibility of the receiver to scan for viruses before opening.

--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
bryan rasmussen
2006-06-23 07:08:59 UTC
Permalink
MSXML does not support exsl tokenize natively, nor does it support the
XSLT 2.0 version. However you can do one of the following:

1. Use FXSL String split to words http://fxsl.sourceforge.net/
http://www.oxygenxml.com/archives/xsl-list/200504/msg00942.html

2. Use an exslt implementation for msxml that supports tokenize
http://www.exslt.org/str/functions/tokenize/index.html

there seems to be one in javascript there by Chris Bayes which I would
expect to be MSXML specific.

3. write your own using javascript, either associated with your own
namespace or using the exslt namespace.
http://www.stylusstudio.com/xsllist/200101/post01420.html

4. Change parser. Saxon's performance has recently outstripped MSXML I
believe so there might not be as much reason to use the latter any
longer.

Cheers,
Bryan Rasmussen
Post by Kamal Bhatt
Don't know if MSXSL supports exslt, but exslt supports tokenize, try to
http://www.exslt.org/str/functions/tokenize/index.html
--
Kamal Bhatt
--
Disclaimer: This email is confidential and may contain privileged information for the sole use of the person or business to which it is addressed. If you are not the intended recipient, please notify the sender by return e-mail or phone as you must not view, disseminate, distribute or copy this email without our consent. We do not accept any liability in connection with any computer virus, data corruption, incompleteness, or unauthorised amendment of this email. It is the sole responsibility of the receiver to scan for viruses before opening.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
Steve
2006-06-26 20:10:59 UTC
Permalink
Went with the FXSL String-split-to-words method. Looks like:

-----------

<xsl:variable name="placementDate"> <!-- "4/15/1982" -->
<xsl:call-template name="str-split-to-words">
<xsl:with-param name="pStr" select="msxsl:node-set($vr//placementDate)" />
<xsl:with-param name="pDelimiters" select="'/'" />
</xsl:call-template>
</xsl:variable>
------
and then later
-----

<input type="text" class="MM" id="referralMM">
<xsl:attribute name="value">
<xsl:value-of select="msxsl:node-set($referralDate)/*[1]" /> <!-- "4" -->
</xsl:attribute>
</input>

----


Thanks for all your suggestions.

-Steve
Post by bryan rasmussen
MSXML does not support exsl tokenize natively, nor does it support the
1. Use FXSL String split to words http://fxsl.sourceforge.net/
http://www.oxygenxml.com/archives/xsl-list/200504/msg00942.html
2. Use an exslt implementation for msxml that supports tokenize
http://www.exslt.org/str/functions/tokenize/index.html
there seems to be one in javascript there by Chris Bayes which I would
expect to be MSXML specific.
3. write your own using javascript, either associated with your own
namespace or using the exslt namespace.
http://www.stylusstudio.com/xsllist/200101/post01420.html
4. Change parser. Saxon's performance has recently outstripped MSXML I
believe so there might not be as much reason to use the latter any
longer.
Cheers,
Bryan Rasmussen
Post by Kamal Bhatt
Don't know if MSXSL supports exslt, but exslt supports tokenize, try to
http://www.exslt.org/str/functions/tokenize/index.html
--
Kamal Bhatt
--
Disclaimer: This email is confidential and may contain privileged information for the sole use of the person or business to which it is addressed. If you are not the intended recipient, please notify the sender by return e-mail or phone as you must not view, disseminate, distribute or copy this email without our consent. We do not accept any liability in connection with any computer virus, data corruption, incompleteness, or unauthorised amendment of this email. It is the sole responsibility of the receiver to scan for viruses before opening.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--

Steve
2006-06-23 15:02:08 UTC
Permalink
Colin,

What's strange is while attempting to use variables to represent
document trees (a function of 2.0), changing the version to 2.0 fixed
a parse error.

For example: $var = document('http...blah.xml') then $var//blah.

So, is it that it only partially supports 2.0?

-Steve

On 23 Jun 2006 06:45:36 +0100, Colin Paul Adams
Post by Colin Paul Adams
MSXSL does not support XSLT 2.0.
--
Colin Adams
Preston Lancashire
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
David Carlisle
2006-06-23 15:06:09 UTC
Permalink
Post by Steve
What's strange is while attempting to use variables to represent
document trees (a function of 2.0),
No, variables can hold node sets (and in particular root nodes
representing documents) in XSLT 1 as well.
Post by Steve
For example: $var = document('http...blah.xml') then $var//blah.
assuming you mean something like
<xsl:variable name="var" select=" document('http...blah.xml')"/>
<xsl:apply-templates select="$var//blah"/>

then that's all XSLT1 features, (although it would work in 2 as well of
course)
Post by Steve
So, is it that it only partially supports 2.0?
It has no support for xslt 2.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
Michael Kay
2006-06-23 15:10:45 UTC
Permalink
Post by Steve
What's strange is while attempting to use variables to
represent document trees (a function of 2.0), changing the
version to 2.0 fixed a parse error.
If you specify version="2.0" when running an XSLT 1.0 processor, then it
runs in "forwards compatibility mode": it then doesn't report errors in
constructs unless they are actually executed and fail at run-time. This was
designed to make it easier to write stylesheets that run with multiple
processors implementing different XSLT versions.

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
Steve
2006-06-26 15:53:49 UTC
Permalink
Poked around Saxon but it doesn't seem that I can use this parser
without .NET (I currently use ASP classic). Is this true?

-Steve
Post by Michael Kay
Post by Steve
What's strange is while attempting to use variables to
represent document trees (a function of 2.0), changing the
version to 2.0 fixed a parse error.
If you specify version="2.0" when running an XSLT 1.0 processor, then it
runs in "forwards compatibility mode": it then doesn't report errors in
constructs unless they are actually executed and fail at run-time. This was
designed to make it easier to write stylesheets that run with multiple
processors implementing different XSLT versions.
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
Michael Kay
2006-06-26 16:11:14 UTC
Permalink
Saxon isn't a parser, it is an XSLT processor. (You are not alone in
referring to XSLT processors as parsers - but the usage is quite incorrect,
and potentially confusing.)

Saxon runs under either .NET or Java. Both platforms are very easy to
install and configure on a Windows box.

Michael Kay
http://www.saxonica.com/
-----Original Message-----
Sent: 26 June 2006 16:54
Subject: Re: [xsl] "'tokenize' is not a valid XSLT or XPath function."
Poked around Saxon but it doesn't seem that I can use this
parser without .NET (I currently use ASP classic). Is this true?
-Steve
Post by Michael Kay
Post by Steve
What's strange is while attempting to use variables to represent
document trees (a function of 2.0), changing the version to 2.0
fixed a parse error.
If you specify version="2.0" when running an XSLT 1.0
processor, then
Post by Michael Kay
it runs in "forwards compatibility mode": it then doesn't report
errors in constructs unless they are actually executed and fail at
run-time. This was designed to make it easier to write stylesheets
that run with multiple processors implementing different
XSLT versions.
Post by Michael Kay
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
Post by Michael Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
Steve
2006-06-26 16:15:09 UTC
Permalink
Ahh, ok. Well the guy above said "change parser" =)

They seem easy enough to install but I was asking if I use Saxon to
perform transformations using ASP classic. I'm guessing not?

-Steve
Post by Michael Kay
Saxon isn't a parser, it is an XSLT processor. (You are not alone in
referring to XSLT processors as parsers - but the usage is quite incorrect,
and potentially confusing.)
Saxon runs under either .NET or Java. Both platforms are very easy to
install and configure on a Windows box.
Michael Kay
http://www.saxonica.com/
-----Original Message-----
Sent: 26 June 2006 16:54
Subject: Re: [xsl] "'tokenize' is not a valid XSLT or XPath function."
Poked around Saxon but it doesn't seem that I can use this
parser without .NET (I currently use ASP classic). Is this true?
-Steve
Post by Michael Kay
Post by Steve
What's strange is while attempting to use variables to represent
document trees (a function of 2.0), changing the version to 2.0
fixed a parse error.
If you specify version="2.0" when running an XSLT 1.0
processor, then
Post by Michael Kay
it runs in "forwards compatibility mode": it then doesn't report
errors in constructs unless they are actually executed and fail at
run-time. This was designed to make it easier to write stylesheets
that run with multiple processors implementing different
XSLT versions.
Post by Michael Kay
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
Post by Michael Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
Tommy Skarateppen
2006-06-23 06:13:27 UTC
Permalink
I don't think MSXML support xslt/xpath 2.0. Try another parser, ie
saxon.

-tommy

-----Opprinnelig melding-----
Fra: Steve [mailto:***@gmail.com]
Sendt: 23. juni 2006 00:04
Til: xsl-***@lists.mulberrytech.com
Emne: [xsl] "'tokenize' is not a valid XSLT or XPath function."


<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="placementToken"
select="tokenize('1-2-3','-')" />

<xsl:variable name="placementMM"
select="item-at($placementToken,0)" />
<xsl:variable name="placementDD"
select="item-at($placementToken,1)" />
<xsl:variable name="placementYYYY"
select="item-at($placementToken,2)" />

-----

Before I begin tinkering with MSXML installation, is there something I'm
not seeing?

-Steve

--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
Loading...