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



Hi John,

> There is an xslt that transforms this XML document in a HTML document. The
> statement that uses @figname is:
> 
> <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. There is nothing in the errata 
  http://www.w3.org/1999/11/REC-xslt-19991116-errata/

saying that the original definition is wrong, so I respectully suggest you
encapsulate @figname by string(@figname) and report the problem to other
implementors. I think libxslt still does the string cast to conform with 
current practice but I'm afraid current practice is broken :-)

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




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