[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

FW: RE: Re: [xsl] XPath syntax error problem

Subject: FW: RE: Re: [xsl] XPath syntax error problem
From: cknell@xxxxxxxxxx
Date: Sun, 23 Jan 2005 15:44:19 -0500

I didn't have the source file or the stylesheet to test my answer as I normally would. This is what happens when you don't test. It helps if you have someone looking over your shoulder to catch the mistakes you make.
Charles Knell
cknell@xxxxxxxxxx - email

-----Original Message-----
From:     G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx>
Sent:     Sat, 22 Jan 2005 19:45:28 -0500
To:       cknell@xxxxxxxxxx
Subject:  RE: Re: [xsl] XPath syntax error problem


Hi Charles ... note that the right paren belongs to the left of the "=" and not the right of the "0". I didn't know if you wanted to correct it publicly or not. By leaving the paren where you put it, I suspect the processor would throw a "not a node set" error because the comparison makes it a boolean.

.................... Ken

At 2005-01-22 15:09 -0500, you wrote:

> " What am I doing wrong?"

The processor has told you what you are doing wrong. You just don't see it.
This is line 24 in your XSL file.

<xsl:if test="count(//*[substring-after(@ref,':') = $elementName] = 0">

How do I know this without seeing the whole file? The error message told me so.
The error message says that you have failed to include a closing parenthesis for the count() function. Change the line to read like this and that message will go away.

<xsl:if test="count(//*[substring-after(@ref,':') = $elementName] = 0)">

Note the right parenthesis between the '0' and the closing quotation mark. It isn't in your code and that's why the processor is complaining.

Charles Knell
cknell@xxxxxxxxxx - email

World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/m/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/m/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Current Thread