Re: [xslt] Bug with the document("") function
- From: Eric van der Vlist <vdv dyomedea com>
- To: xslt gnome org
- Subject: Re: [xslt] Bug with the document("") function
- Date: 19 Jun 2002 15:17:45 +0200
On Wed, 2002-06-19 at 14:53, Daniel Veillard wrote:
> On Wed, Jun 19, 2002 at 02:19:56PM +0200, Eric van der Vlist wrote:
> > On Wed, 2002-06-19 at 14:04, Daniel Veillard wrote:
> >
> > > thanks for the report !
> >
> > You're welcome.
> >
> > Also, I haven't enough time to check your fix right, but 4xslt has an
> > issue with the fix they've applied when the XSLT transformation is given
> > as an existing DOM tree rather than as a file (in this case the original
> > DOM tree needs to be saved for later use which is a waste of memory but
> > I don't see what else could be done).
>
> Well, in the case of libxslt, if the tree is built from scratch with DOM,
> it won't have a base URI, which means that document('') won't work and
> this is IMHO very sensible considering the definition of '' URI-Reference
> per RFC 2396. If you build an URI-Reference on a resource without base and
> that reference ain't sufficient to compute an URL well, you should get an
> error, isn't it ?
Yes, but OTH when you are working in memory you may want to generate a
XSLT transformation from existing trees and this transformation may want
to access to its own source.
4xslt does this by using a baseURI parameter in its StylesheetReader
module when a transformation is read from a DOM tree:
def fromDocument(self, document, baseUri='',isf=None):
It's probably not perfect but quite flexible!
Eric
>
> 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/
> _______________________________________________
> xslt mailing list, project page http://xmlsoft.org/XSLT/
> xslt@gnome.org
> http://mail.gnome.org/mailman/listinfo/xslt
>
>
--
See you in San Diego.
http://conferences.oreillynet.com/os2002/
------------------------------------------------------------------------
Eric van der Vlist http://xmlfr.org http://dyomedea.com
http://xsltunit.org http://4xt.org http://examplotron.org
------------------------------------------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]