Re: [xslt] document('')



On Fri, Jul 12, 2002 at 11:22:10AM +0100, Matt Sergeant wrote:
> Yes I did, but breaking one of these fundamental features of XSLT just
> because I'm using strings instead of files seems daft. I guess Daniel's
> mileage varies there ;-)
>
> Michael Kay's book specifies that document('') refers to "the stylesheet
> itself". It says nothing about relative/absolute URIs, which is only
> relevant when the string has length > 0, as far as I can make out.

  The document() functions is being passed a string which is an
URI-Reference.
  Using '' as an URI reference when the pointed document has no
base (like when aquired from a pipe) is simply meaningless. 
  The reference ain't Michael Kay's wording but RFC 2396 and Co.
In general passing document as in-memory strings do have a LOT
of impact on a lot of XML or more generally Web related standards
because they tend to rely heavilly on URI-References and those
quite often rely on the Base URI which is no more available in this
case.

  The behaviour changed from reusing the stylesheet document to
reparsing it from scratch for compliance to the XSLT specification,
see the bug reported by Eric van der Vlist last month:
  http://mail.gnome.org/archives/xslt/2002-June/msg00055.html

  I could try to reimplement the same old behaviour, but faking
a semantic to '' URI-References when there is no base doesn't sound
a good idea

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
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]