Re: [xslt] Starting Over - No user context available when apply stylesheet loads an external entity



Daniel Veillard wrote:
On Thu, Nov 17, 2005 at 06:17:43PM -0800, Rush Manbert wrote:

Hi all,

I'm sorry for this. My second post on this subject was incorrect, so I am starting the whole thing again.


  I'm not sure why it's incorrect. The idea of propagating _private info from
libxslt down to libxml2 makes some sense to me.


However, when I apply a XSL stylesheet transformation to my document,
using xsltApplyStylesheetUser(), it often loads other XHTML source
files.


  So at that point you have a transformation context, with a _private field
I don't see why this can't be propagated when new document are parsed (
usually when the XSLT document() is used I guess).
  Such a change would make sense. I take patches.

Thanks for the reply Daniel. The problem that I see is that there are four (in 1.1.14 ) callers to the xslt loader function, and they pass different things as the "ctxt" argument to the loader:


xslt.c:      xsltParseStylesheetFile()   passes NULL
imports.c:   xsltParseStylesheetImport() passes xsltStylesheetPtr
documents.c: xsltLoadDocument()          passes xsltTransformContextPtr
             xsltLoadStyleDocument()     passes xsltStylesheetPtr


Backtracking, I find that xsltParseStylesheetFile() is called from xsltLoadStylesheetPI(), which is passed a xmlDocPtr. I stopped there because it's pretty clear that getting user context propagated through all of the possible paths is a big job, and I've got a deliverable deadline looming.


When (and "if", if I'm going to be honest) I do get time to pursue this, I assume you only want patches against the current CVS?

- Rush

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