Re: [xslt] DocLoader API Feedback

How do I know which xmlNodePtr is being processed at the time? It seems like the URI is not enough to sufficiently disambiguate between the same stylesheet that might be both imported and included by a parent stylesheet.

  <import href="othersheet.xsl"/>
  <import href="othersheet.xsl"/>

Is the above legal in XSLT? If it is, should I be giving you the exact same xmlDocPtr both times? If I am supposed to give you two different xmlDocPtrs, then how can I distinguish between the two loader requests, since they both have the same URI and parent stylesheet? The same question exists for two <include> elements with the same URI.


On Aug 18, 2004, at 11:33 PM, Daniel Veillard wrote:

On Wed, Aug 18, 2004 at 03:56:50PM -0700, David Hyatt wrote:
Just in case our URL canonicalization schemes don't match up, could you
make the void* ctxt argument to the docloader function be the
import/include xmlNodePtr rather than the xsltStylesheetPtr? This
makes more sense to me conceptually anyway. That way I can just do a
quick and easy pointer comparison to match up to the right xmlDocPtr.

You should get the document as style->doc, but if I pass that directly
you loose parent and more importantly the _private field, which may be
used for a variety of things including specific error reporting/warnings.
It seems to me that doing the change you propose won't make your work
really easier but will make a lot of thing impossible,

  If style->doc doesn't work, then let's fix it, but I really prefer to
return a generic pointer in the API,


Daniel Veillard | Red Hat Desktop team
veillard redhat com | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine
xslt mailing list, project page
xslt gnome org

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