List Info

Thread: varying entity resolution (was Re: adding transformContexts to Python)




varying entity resolution (was Re: adding transformContexts to Python)
user name
2006-09-01 16:08:06
On Fri, Sep 01, 2006 at 03:58:18PM +0100, Nic James Ferrier
wrote:
> Replying to myself:
> 
> > I wrote a test for the resolver access:
> 
> <snip/>
> 
> >   def xslt_resolver(url, id, ctxt):
> >       pctxt =
libxslt.xpathParserContext(_obj=ctxt)
> >       xpc = pctxt.context()
> >
> >       if url == "someimport.xslt":
> >           f =
StringIO.StringIO("""<?xml
version="1.0" encoding="utf-8"?>
> >   <xsl:stylesheet  version="1.0"
> >                    xmlnssl=&
quot;http://www.w3.or
g/1999/XSL/Transform">
> >       <xsl:template
match="/xxx">
> >           <sexy/>
> >       </xsl:template>
> >   </xsl:stylesheet>
> >   """)
> >           return f
> >       return None
> 
> This breaks.
> 
> 
> I really wanted to be able to access the
xsltTransformContext from
> here.
> 
> But it appears that I've been wrong about this... the
ctxt delivered
> to the resolver is an xmlParserCtxt, not an
> xpathParserContext. Moreover the xmlParserCtxt doesn't
seem to have
> anyway of getting to an xpathParserContext or an
xsltTransformContext.
> 
> 
> The reason I wanted to be able to reach the tranform
context was so
> that I could uniquely identify a transformation.
> 
> I've got a webapp where users can have personalized
copies of common
> xslts. In the resolver I want to be able to say:
> 
> - what request is this resolution associated with?
> 
> - what is the user's id (from the http request)
> 
> - what is the correct directory to search for xslt
imports and other
>   entities?
> 
> 
> If I can't do this by getting the transformContext can
anyone suggest
> how I might do it?

  Hum, for Apple/Safari we added xsltSetLoaderFunc() in
documents.h
I'm really busy right now, I can't really go though code
or review
in the next days, but I guess it's a hint in the right
direction for you,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/v
irtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillardredhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ |
Rpmfind RPM search engine  http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
varying entity resolution
user name
2006-09-01 20:40:16
Daniel Veillard <veillardredhat.com> writes:

>   Hum, for Apple/Safari we added xsltSetLoaderFunc() in
documents.h
> I'm really busy right now, I can't really go though
code or review
> in the next days, but I guess it's a hint in the right
direction for
> you,

Oh brilliant.


Accepting you are busy is there even an example usage you
could point
me to?


-- 
Nic Ferrier
http://www.tapsellfer
rier.co.uk   for all your tapsell ferrier needs
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
varying entity resolution
user name
2006-09-01 22:14:56
On Fri, Sep 01, 2006 at 09:40:16PM +0100, Nic James Ferrier
wrote:
> Daniel Veillard <veillardredhat.com> writes:
> 
> >   Hum, for Apple/Safari we added
xsltSetLoaderFunc() in documents.h
> > I'm really busy right now, I can't really go
though code or review
> > in the next days, but I guess it's a hint in the
right direction for
> > you,
> 
> Oh brilliant.
> 
> 
> Accepting you are busy is there even an example usage
you could point
> me to?

  Not really but if you find the thread where this was
discussed and
designed last year or the WebCore XSLT code which uses it.
Try googling 

Daniel

-- 
Red Hat Virtualization group http://redhat.com/v
irtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillardredhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ |
Rpmfind RPM search engine  http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )