|
Subject: Re: [xsl] Passing side documents to stylesheet (in Java) From: Andrew Franz <afranz0@xxxxxxxxxxxxxxxx> Date: Thu, 26 Oct 2006 07:45:11 +1000 |
Hi Matynas, I'm going through a PHP-to-Java conversion myself.
Using JSP and JSTL, I've used the following method: (illustrating passing of request parameters)
In the JSP page:
<x:parse var="requestXml">
<params>
<param id="action">${param['action']}</param>
...
</params>
</x:parse>
...
<x:translate doc="<uri of XML document>" xslt="URI of XSLT document">
<x:param name="rx" value="${requestXml"} />
...
</x:translate>In the XSLT: ... <xsl:param name="rx" />
<p>Action:<xsl:value-of select="$rx/params/param[@id='action']" /><br/> ...
More info about Xalan-Java extensions here: http://xml.apache.org/xalan-j/extensions.html#ext-functions
Hi,
probably this is an old issue, but I'm struggling to find a solution.
My XSLT stylesheet is using several side documents that are constructed at run-time.
Back in PHP I was passing them using a stream wrapper and a custom "arg:" protocol. Then, for example, the stylesheet could get access through document('arg://mydoc').
Obviously, that doesn't work in Java. So how do you do it in Java? I'm using JDK 1.5 and the standard java.xml.transform package.
Thanks,
Martynas
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Passing side documents to, Andrew Welch | Thread | [xsl] Needing suggestions for bette, Kevin.Weiss |
| Re: [xsl] getting type information , David Carlisle | Date | [xsl] Finding the last ancestor of , Fleetwood, Brett \(D |
| Month |