Re: [xslt] XSLT equivalent to xmlXPathEval?
- From: Daniel Veillard <veillard redhat com>
- To: xslt gnome org
- Subject: Re: [xslt] XSLT equivalent to xmlXPathEval?
- Date: Thu, 21 Feb 2002 18:45:20 -0500
On Thu, Feb 21, 2002 at 05:34:09PM -0600, Matt Cruikshank wrote:
> Greetings -
> I had been executing the following :
> xmlXPathObjectPtr nodeList = xmlXPathEval("//employee [name=\"louis\"]/job",
> With correct results. Now I found out that some people are using my
> function like this :
> xmlXPathObjectPtr nodeList = xmlXPathEval("//employee [$any$
> name=\"louis\"]/job", context);
> That extra $any$ is ruining the xmlXPathEval. Here is the message I get out
> Error C:\home\igor\src\gnome-xml\xpath.c:7497: Invalid predicate
> //employee [$any$ name="louis"]/job
> xmlXPathEval: evaluation failed
Right xmlXPathEval implements the XPath 1.0 Language
And that construct is not allowed by that language.
> Looking in the books that I have, I see that $any$ is an XSL operator. I
Maybe, maybe not. It doesn't matter anyway.
> haven't been able to figure out how to do a single XSL evaluation in XSLT.
> What function in XSLT do I call that's roughly equivalent to xmlXPathEval,
> but understands operators like $any$?
$any$ is not part of the XPath syntax. XSLT uses the XPath syntax,
the syntax you're showing cannot be handled by libxml2 XPath engine nor by
libxslt XSLT 1.0 implementation.
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
email@example.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
] [Thread Prev