Re: [xslt] Bug with the document("") function



On Wed, Jun 19, 2002 at 03:17:45PM +0200, Eric van der Vlist wrote:
> 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!

  From libxml2 you can use 

void xmlNodeSetBase(xmlNodePtr cur, xmlChar* uri);

on the document node or one of the elements if you really want to
update the base per RFC-2396 (and possibly the XML base REC).

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]