Re: [xslt] unparsed-entity-uri bug?
- From: Thomas Broyer <tbroyer ltgt net>
- To: veillard redhat com
- Cc: xslt gnome org
- Subject: Re: [xslt] unparsed-entity-uri bug?
- Date: Tue, 10 Apr 2001 20:55:16 +0200
Le 10/04/01 19:15:33, Daniel Veillard a écrit :
> > <xsl:when test="unparsed-entity-uri(@figname)">
> >
> > When I use xsltproc, I got this error:
> >
> > unparsed-entity-uri() : invalid arg expecting a string
>
> Hum,
>
> http://www.w3.org/TR/xslt#function-unparsed-entity-uri
>
> the spec defines
> "Function: string unparsed-entity-uri(string)"
>
> -------------------
> The unparsed-entity-uri returns the URI of the unparsed entity with the
> specified name in the same document as the context node (see [3.3
> Unparsed
> Entities]). It returns the empty string if there is no such entity.
> -------------------
>
> I think my implementation follows the spec, but differs from existing
> implementations which silently transform the node set into its string()
> value.
In http://www.w3.org/TR/xpath#section-Function-Calls :
3.2 Function Calls
A FunctionCall expression is
evaluated by using the FunctionName to
identify a function in the expression evaluation context function
library,
evaluating each of the Arguments,
converting each argument to the type
required by the function, and
finally calling the function, passing it the
converted arguments.
So libxslt is buggy.
This leads to, maybe, a problem in the implementation in the way that it's
up to the function to cast the received argument rather than the XPath
processor converts the arguments and then call the function (registered
with a description of its arguments and whether they are optional or
required).
Though this would (a priori but not necessarily I think) break programs
using XPath with libxml.
Tom.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]