p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   XSLT (http://p2p.wrox.com/forumdisplay.php?f=86)
-   -   How to pass the dynamic XML file name to XSL (http://p2p.wrox.com/showthread.php?t=66618)

jle March 13th, 2008 12:22 PM

How to pass the dynamic XML file name to XSL
 
Hi All,
The text below is part of the XSL which is define the object's param for the FLASH. This FLASH object is used bytes.xml file. But instead of hard-coded here bytes.xml I would like to pass this file name to XSL file because each user has different bytes.xml file.
So Is there any way that I can pass the file name to XSL file which is defined at the run time. We are using xalan of Apache

<xsl:param name="file" select="'xml/bytes.xml'"/>
<PARAM NAME="quality" VALUE="high"/>
<PARAM NAME="bgcolor" VALUE="#FFFFFF"/>
<PARAM NAME="movie" VALUE="charts.swf" stage_width="720" stage_height="190" library_path="charts_library" xml_source="{$file}"/>

How do you set the parameter depends on the C++ XSLT processor you're using

Thanks,
JP


joefawcett March 13th, 2008 12:59 PM

How you set parameters depends on the XSLT processor you're using. For example in MSXML use addParameter, in .NET XML use an XsltArgumentList.

--

Joe (Microsoft MVP - XML)

jle March 13th, 2008 04:06 PM

Hi ,
Thanks for the answer!
I used the XSLT processor of Xalan Apache.

If you know more information about setting this parameter please let me know. Thanks a ton
JP


mhkay March 13th, 2008 04:20 PM

There's a nice tool you can use for searching for this kind of information, it's called Google.

Type in "Apache Xalan C++ API set stylesheet parameter", and it gets you straight to the answer.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference


All times are GMT -4. The time now is 04:39 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.