You could write a URIResolver that intercepts the request for
myXmlString.xml and returns a StreamSource that wraps a StringReader that
wraps the relevant string.
Or you could parse the document in your calling application (use
Configuration.buildDocument()) and pass the resulting document node to the
transformation as a parameter.
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: John Smith [mailto:debrief(_at_)gmail(_dot_)com]
Sent: 16 September 2007 16:10
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] passing xml strings to xslt using saxon in java
Hello,
I have a xslt which needs to use 2 xml files, the first one
is not actually a file but an xml formatted string and the
second one is an xml file.
So I want:
xmlString + rules.xml + XSL.xslt = Result.xml
I have tested the scenario with the xsl file referencing the
xml files as:
<xsl:variable name="myrules" select="document('myrules.xml')"/>
<xsl:variable name="xmlstring" select="document('myXmlString.xml')"/>
and then created a resulting xml file. However instead of
referencing a file I want to dynamically pass an xmlString to
it. I am using
Java+Saxon, is there a way around this? or any alternative methods to
address this problem?
Many thanks,
J
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--