[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Re: using SAX events in URIResolver (Xalan and Saxon)


Subject: Re: [xsl] Re: using SAX events in URIResolver (Xalan and Saxon)
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Sun, 16 Jan 2005 12:22:06 -0800

Michael Kay wrote:
I'm very confused by what you're trying to do here.

You've got a transformation T, running in the form of a TransformerHandler,
that calls the document function to access a document D. You say "The
Transformer resolver sends the current TransformerHandler to a method that
uses it to send SAX events." So D is actually the output of T - or have I
misunderstood?

No you did not misunderstand. I just did not know what I was saying/doing. But your confusion has shown me the error of my ways. It is working now!! And it work in both Saxon and Xalan.


woohoo!!

I had thought (guessed...) that the TransformerHandler sends source events to the TemplatesHandler.

I fixed it by extending InputSource to set/get the cache entry. Then extended XMLFilterImpl to take my cache entry as the parent. So when the parse is called on the reader, it gets its cache entry from the InputSource and outputs the list of events.

I don't know if I will use this in the end, but it has been a good learning experience for me.


This sounds to me as if you are trying to get the
transformation to read its own output. Surely it shouldn't be surprising if
this causes some kind of infinite loop?

not if you don't know what you are doing :)


Thanks for your help,
-Rob



Michael Kay http://www.saxonica.com/


Current Thread