Re: [xslt] Import/Include Stylesheets

On Wed, Aug 08, 2001 at 02:36:27PM +1000, Steve Ball wrote:
> libxslt is complaining that it cannot import (include)
> stylesheets which are specified using a relative URI.
> The problem is that I'm invoking it using xmlParseMemory
> to parse the stylesheet document and then xsltParseStylesheetDoc
> to compile the stylesheet.  That is, I have already the stylesheet
> into memory.  There doesn't seem to be a way of telling 
> libxml/libxslt the base URI of the document so that it can 
> resolve the relative URI.

  Right, a document built in memory has no base a priori,
and hence all URI-References resolution are a problem.

> Tried using xmlNodeSetBase in between parsing the document
> and compiling it, but that doesn't appear to do the trick.

  Hum, right, currently xmlNodeSetBase just works on element
I should fix it to work on element nodes. In the meantime
just provide the base URI in doc->URL.


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]