You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Jacob Lund <jl...@qualiware.com> on 2002/10/28 16:45:39 UTC
Xalan-c and xpath
Hi All!
Does xalan-c support namespace in the xpath part??
My problem is that an xpath like this "count(/D:multistatus/D:response)"
returns an error:
XPath failure, check syntax in XPath Expression Unable to resolve prefix
'D'.
pattern = 'count(/D:multistatus/D:response)'
Remaining tokens: ('count' '(' '/')
Am I missing something or do I need to enable namespace support in
anyway??
Regards
Jacob
PS: Is there a users mailing list for xalan-c??
Re: Xalan-c and xpath
Posted by David N Bertoni/Cambridge/IBM <da...@us.ibm.com>.
Yes, it does.
However, you've given no information as to how you are invoking Xalan-C.
If you've wriiten a stylesheet, you might include a _short_ sample input
document and _short_ stylesheet which reproduces the problem.
If you're using the XPathEvaluator class, then you need to implement a
prefix resolver that maps the prefix to a namespace. Otherwise, how is
Xalan supposed to figure out what you meant by the prefix "D?"
By the way, that looks something like a Xalan error message, but with some
modifications that aren't coming from the Xalan code. Did you misquote the
error message, or is some other code producing them?
Dave
"Jacob Lund"
<jl@qualiware.co To: <xa...@xml.apache.org>
m> cc: (bcc: David N Bertoni/Cambridge/IBM)
Subject: Xalan-c and xpath
10/28/2002 10:45
AM
Please respond
to xalan-dev
Hi All!
Does xalan-c support namespace in the xpath part??
My problem is that an xpath like this "count(/D:multistatus/D:response)"
returns an error:
XPath failure, check syntax in XPath Expression Unable to resolve prefix
'D'.
pattern = 'count(/D:multistatus/D:response)'
Remaining tokens: ('count' '(' '/')
Am I missing something or do I need to enable namespace support in
anyway??
Regards
Jacob
PS: Is there a users mailing list for xalan-c??