Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 13th, 2008, 12:22 PM
jle jle is offline
Registered User
 
Join Date: Mar 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jle
Default 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

 
Old March 13th, 2008, 12:59 PM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)
 
Old March 13th, 2008, 04:06 PM
jle jle is offline
Registered User
 
Join Date: Mar 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jle
Default

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

 
Old March 13th, 2008, 04:20 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
insert in xsl template some xml file ratzko XSLT 2 January 16th, 2008 08:30 AM
how to pass values from javascript to xml file satish_sgk Javascript How-To 1 November 24th, 2007 07:27 PM
Pass link values as xsl:parameter to php5 then xsl pauljr8 XSLT 1 July 2nd, 2007 10:32 PM
Dynamic html file call in XSL suri XSLT 4 June 22nd, 2007 08:03 AM
XSL to replace text in XML file neetukk XSLT 1 November 29th, 2006 05:20 AM





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