OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
having problems passing parameters to xsl stylesheet from jsp pages
This page's ID:
27034
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
hi, i would like my javascript in jsp pass a parameter value to an xsl stylesheet, all looks ok but just doesnt work. the page displays nothing. here is the javascript +++++++++++++++++++++++ <script type="text/javascript">// Load XML // Load XML var xml = new ActiveXObject("Microsoft.XMLDOM"); xml.async = false; xml.load("msg.xml"); // Load XSL var xsl = new ActiveXObject("Microsoft.XMLDOM"); xsl.async = false; xsl.load("sort.xsl"); // Transform var template = new ActiveXObject("MSXML2.XSLTemplate"); template.stylesheet = xsl; val processor = template.createProcessor(); processor.input = xml; processor.addParameter("sortKey", "author"); processor.transform(); //document.open(); //document.write(processor.output); //document.close(); document.write(xml.transformNode(xsl));</script> ++++++++++++++++++ and the xsl file +++++++++++++++++ ............ <xsl:for-each select="messageboard/message"> <xsl:sort select="$sortKey" order="ascending"/> <li> <a> <xsl:attribute name="href">display.jsp?msgid=<xsl:value-of select="@id"/></xsl:attribute> <xsl:value-of select="subject"/> ................ +++++++++++++++++ any help pls?thanks
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »