JDOM XSLT with parameters?

S

Son KwonNam

Hi~
I usually use JDOM for XML Processing.
But, when I tried transforming XSL, I could not find the way to pass
parameters to XSLT Processor.
"parameters" which are defined in XSL document.
( <xsl:param name="blah.."/> )

Is it possible to use JDOM XSL Transform with parameters?

Thanks,
KwonNam.
 
M

Martin Honnen

Son KwonNam wrote:

I usually use JDOM for XML Processing.
But, when I tried transforming XSL, I could not find the way to pass
parameters to XSLT Processor.
"parameters" which are defined in XSL document.
( <xsl:param name="blah.."/> )

Is it possible to use JDOM XSL Transform with parameters?

I haven't used JDOM but looking at the API I think you need to use a
JAXP TrAX Transformer and pass a JDOMSource in e.g.

javax.xml.transform.Transformer xsltProcessor;

JDOMSource xsltInput = new JDOMSource(jdomDocument);
xsltProcessor.setParameter("blah", "Kibology");

xsltProcessor.transform(xsltInput, suitableOutputhere);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top