XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + Use of before and after string (3) Sticky Topic
-> - How do I substitute element ty... (1)
-> + How does one add working days ... (4)
-> - Help, I have existing XLT and... (1)
-> + Need help on XSLT issue - (2)
-> + EDI to XML Conversion (7)
-> - XML To JSON Conversion using X... (1)
-> + Formatting Paragraphs to same ... (2)
-> - Grouping of records (1)
-> + Problems with xsd 1.1 (4)
-> + XML to HL7 mapping (3)
-> + XSLT 3 and Iterate (2)
-> + XSL-FO to PDF preview (3)
-> + java.lang.RuntimeException: Er... (2)
-> + Create Acroforms with Stylus X... (2)
-> + How to change XSLT parameter s... (3)
-> + how to change format of the da... (2)
-> + Search "Next 8 Results " doesn... (2)
-> - Support for Git (1)
-> + newbee (8)
-- [1-20] [21-40] [41-60] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
kanchan thukralSubject: how to pass some attribute value from jsp to XSL
Author: kanchan thukral
Date: 09 Sep 2005 05:48 AM
hello,

please tell me how can i pass the value of one attribute from my jsp to xsl.

like that jsp have variable which have FromDate and Todate.
please tell me

kanchan

Postnext
N TSubject: how to pass some attribute value from jsp to XSL
Author: N T
Date: 09 Sep 2005 11:39 AM
Hello,
I am assuming that you need to pass some variable value from JSP to XSL. You would have to pass it in as a parameter.

TransformerFactory transFact =
TransformerFactory.newInstance();
Transformer trans = transFact.newTransformer(xsltSource);
trans.setParameter("paramname", strParamValue);

Obviously, there is more to it than this. But this should tell you how to pass it in JSP.

This is how you would receive it in XSL:
<xsl:output method="html"/>
NOTE: this param tag should be a global tag (after stylesheet or output tags).
<xsl:param name="paramname"></xsl:param>

Let me know if this helps and if you have any more questions.

Postnext
kanchan thukralSubject: how to pass some attribute value from jsp to XSL
Author: kanchan thukral
Date: 12 Sep 2005 05:40 AM
hello
in your reply you told me to include this portion of the code in jsp.
but what should i specify instead of this xsltSource.
is this will be the name of the xsl file or what.
please guide me.

TransformerFactory transFact =
TransformerFactory.newInstance();
Transformer trans = transFact.newTransformer(xsltSource); <-----
trans.setParameter("paramname", strParamValue);

looking fwd for your reply.

Posttop
N TSubject: how to pass some attribute value from jsp to XSL
Author: N T
Date: 12 Sep 2005 10:04 AM

You will need to create a Source object like this:

Source xsltSource = new StreamSource(xsl);

Here, xsl is an Input Stream. It could also be a URL. But, you will need to pass in the Source.

Let me know if you have any questions.

-Ninad

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.