Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 13th, 2008, 12:22 PM
jle jle is offline
Registered User
 
Join Date: Mar 2008
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old March 13th, 2008, 12:59 PM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
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)
Reply With Quote
  #3 (permalink)  
Old March 13th, 2008, 04:06 PM
jle jle is offline
Registered User
 
Join Date: Mar 2008
Location: , , .
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

Reply With Quote
  #4 (permalink)  
Old March 13th, 2008, 04:20 PM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:48 PM.


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