File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Retrieving param values in xslt Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "Retrieving param values in xslt" Watch "Retrieving param values in xslt" New topic
Author

Retrieving param values in xslt

john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
I was wondering if it was possible to retrieve paramaters which were set through the following code below in the xslt? If yes how would I do that

//Transformer.setParameter(String name, Object value)
Transformer.setParameter("test", new String("test"))


I'm trying to set a parameter based on the user and then use this help xpath find the appropriate node.

Thank you for your time
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16482
    
    2

You would declare each one as a top-level <xsl:param> element in your XSLT code, like for your example:The name attribute, in this case "test", would be the first parameter of the setParameter call.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Retrieving param values in xslt
 
Similar Threads
Execting Java methods from XSLT
Out of memory when using transform function on huge xml
Using Saxon implementation for XSLT
render string array in xslt
How can I pass a node as parameter to translets for XSLTC-Processor of Xalan?