Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Is it possible to load user.dir into an AVT

Reply
Thread Tools

Is it possible to load user.dir into an AVT

 
 
Daniel
Guest
Posts: n/a
 
      08-25-2005
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:

<xslaram name="location">

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

</xslaram>


 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      08-26-2005


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:
>
> <xslaram name="location">
>
> <xsl:text>${user.dir}/</xsl:text><xsl:value-of select="$name"/>
>
> </xslaram>


All you need to do in the XSLT is to declare the global parameter e.g.
<xslaram 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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Load Balancing / Load Sharing over parallel paths ciscortp@hotmail.com Cisco 1 11-21-2005 03:57 PM
page not load / freeze / long time to load roni ASP .Net 1 08-30-2005 09:15 PM
Page Load and webcontrol page load venky ASP .Net 5 07-11-2005 03:16 PM
beginning page load immediately on postback with a long load time ? Mad Scientist Jr ASP .Net 7 06-30-2004 07:40 PM
AVT / Curly braces : why don't they work for me ? Geathaa XML 1 09-12-2003 01:35 PM



Advertisments