Is it possible to load user.dir into an AVT

Discussion in 'XML' started by Daniel, Aug 25, 2005.

  1. Daniel

    Daniel Guest

    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>
     
    Daniel, Aug 25, 2005
    #1
    1. Advertising

  2. Daniel wrote:

    > 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.


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Aug 26, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UnVkeQ==?=

    Sub Dir, Virtual dir, what do I use?

    =?Utf-8?B?UnVkeQ==?=, Jun 12, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    443
    =?Utf-8?B?UnVkeQ==?=
    Jun 12, 2005
  2. Geathaa
    Replies:
    1
    Views:
    543
    Martin Honnen
    Sep 12, 2003
  3. Matthew Denner
    Replies:
    1
    Views:
    211
  4. Kga Agk
    Replies:
    2
    Views:
    160
    Kga Agk
    Jun 29, 2009
  5. Nick Gnedin
    Replies:
    2
    Views:
    174
Loading...

Share This Page