This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: xml as parameter from servlet


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]