This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: xml as parameter from servlet
- From: Robert Koberg <rob at koberg dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Sun, 07 Apr 2002 09:12:52 -0800
- Subject: Re: [xsl] xml as parameter from servlet
- References: <3CB06D4C.7020307@koberg.com> <3CB06D50.3030607@yahoo.de>
- Reply-to: xsl-list at lists dot mulberrytech dot com
It works. I found a spelling error in my XSLT (groan...). I am not
sending a string to be magically processed. I am transforming it into a
nodeset before setting the parameter for the transformation.
but it is pretty slow for such a small amount of data...
I will look into your third suggestion it sounds like what i want to do.
Thanks,
-Rob
J.Pietschmann wrote:
> Robert Koberg wrote:
>
>> I have been trying to get a Saxon(6.5.1) transformation to accept xml
>> as a parameter.
>
>
> You can't do that in the manner you tried. You passed a string
> as a parameter, and the processor binds it as a string to the
> parameter, and it stays a string throughout the process. It
> wont be magically processed (parsed) into a node set, or
> XML tree, what you actually want.
> One possibility is to construct an XML tree and pass it as
> a parameter. This is, however, procesor specific and in general
> not very well documented. I remember some posts on this list
> where M.Kay hinted how this has to be done for Saxon, i'm not
> able to dig them out of the archives right now, sorry.
>
> The second possibility is to write a customized XML source and
> an URIResolver which passes it on request of a special URI
> to the processor, and use the document() function to
> access your source. See
> http://www.biglist.com/lists/xsl-list/archives/200107/msg01261.html
> and follow-ups.
>
> A third possibility is to build yourself an XMLReader which
> uses a standard XMLReader to parse your source document into
> a SAX event stream for passing into the XSLT processor and
> splices your parameter data into the SAX event stream.
>
> HTH
> J.Pietschmann
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list