[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: get the xsl:variable in an other xsl?

Subject: Re: get the xsl:variable in an other xsl?
From: Jarkko.Moilanen@xxxxxx
Date: Fri, 4 Apr 2003 12:25:36 +0300
john moilanen
Lainaus John Barden <jb@xxxxxxxx>:

| Hi,
| 
| I have a problem.
| 
| There are 4 Files: data.xml -> data.xsl and details.xml -> details.xsl
| 
| I have a xsl:variable in the data.xsl:
| <xsl:variable name="structure">
| <xsl:value-of select="root/data/test"/>
| </xsl:variable>
| 
| And there is a link to "details.xml" on the "data.xml" file.
| 
| When the user clicks the link, I want to show the xsl:variable from the
| data.xsl on the details.xml page. So I need the variable in the
| details.xsl.
| 
| How have I got to do this?
| Is it possible to change the link to details.xml with a parameter (like
| details.xml?structure=blabalbla)? If I do this, how can I then get the
| parameter in the details.xsl?
| Or can I use something like the document() function in the details.xsl
| to get the variable from the other file?
| 

Yes you can use the document() function. In my current work I collect these
variables into separate xsl file which I normally include to the main xsl file.

<xsl:variable name="UpperBackGroundImg"
select="document('images.xml')/xslt/NotunsignedImages/upbg"/>

Now in the main xsl file i can call $UpperBackGroundImg and get the value of
upbg element from images.xml.

Others can add more solutions, since in xslt there no one and only solution to
different needs. Hope I understood the question correcly...If not, sorry in
advance.

Cheers, 
Jarkko


| I hope, you understand my problem. Sounds a bit difficult. But I really
| need it.
| 
| Thanks for your help
| 
| 
| greets
| John
| 
| 
|  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| 
| 


***************************************************
* Jarkko Moilanen                                 *
* Project Researcher, ITCM (www.itcm.org)         *
* Profound XML technology Expert                  *
* University of Tampere                           *
* Hypermedia Laboratory                           *
***************************************************

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.