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
  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

  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:

  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 Veillard      | Red Hat Network  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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