[XSL] : how to get the value of a variable defined in a program ?

M

MC

HI to all,

First excuse me but i'm xsl beginner.

I'm using XSL to transform an xml file into another. I'm using a Java
program for the transformation (TraX API).

I would like to recover in the xsl stylesheet the value of a variable
defined in my Java program. Is it possible ?

Thanks a lot for yours answers

Marie
 
M

Martin Honnen

MC said:
I'm using XSL to transform an xml file into another. I'm using a Java
program for the transformation (TraX API).

I would like to recover in the xsl stylesheet the value of a variable
defined in my Java program. Is it possible ?

You can pass in parameters to the processor before running a
transformation, see
<http://java.sun.com/j2se/1.4.2/docs...Parameter(java.lang.String, java.lang.Object)>
That parameter needs to be declared in the XSLT stylesheet e.g.
<xsl:param name="paramName" />
and then the stylesheet elsewhere uses
$paramName
in expressions.
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top