Re: [xslt] unparsed-entity-uri bug?

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, 
> 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 :
3.2 Function Calls
A FunctionCall expression is
 evaluated by using the FunctionName to
identify a function in the expression evaluation context function
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
Though this would (a priori but not necessarily I think) break programs
using XPath with libxml.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]