Is it possible to load user.dir into an AVT

D

Daniel

Obviously, I'm a newbie to the XSLT lingo, But I was wondering if XLAN or
otherwise provides any internal mechanism for setting a param or AVT with
the current user.dir from the JVM? Looking from some like:

<xsl:param name="location">

<xsl:text>${user.dir}/</xsl:text><xsl:value-of select="$name"/>

</xsl:param>
 
M

Martin Honnen

Daniel said:
Obviously, I'm a newbie to the XSLT lingo, But I was wondering if XLAN or
otherwise provides any internal mechanism for setting a param or AVT with
the current user.dir from the JVM? Looking from some like:

<xsl:param name="location">

<xsl:text>${user.dir}/</xsl:text><xsl:value-of select="$name"/>

</xsl:param>

All you need to do in the XSLT is to declare the global parameter e.g.
<xsl:param name="location" />
then the XSLT processor has an API to set such global parameters before
a transformation is run. If you are asking about Xalan Java then there
is not even an API specific to Xalan but the SUN JAXP API that most Java
implementations of XSLT 1.0 implement by now:
<http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/transform/Transformer.html>
You then simply write your Java code reading out that property, create
your transformer, pass in the parameter and run the transformation.
 

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

Forum statistics

Threads
474,001
Messages
2,570,251
Members
46,851
Latest member
CristineKo

Latest Threads

Top