[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 14:45:58 +0300
xslt variable variable
Lainaus John Barden <jb@xxxxxxxx>:

| > It is not set automatically. Replace it with your own XPath expression.
| >
| > <xsl:variable name="YourVariableName"
| >  select="document('YourXML.xml')/your/XPath"/>
| 
| Ok, but how can I set the XPath? Can you give me an Example?

Ok, consider this xml snippet named as variables.xml as sourcetree:

<?xml version="1.0"  encoding="ISO-8859-1" standalone="yes"?>
<variables>
 <variable>
  <value>Xpath result</value>
 </variable>
</variables>

This xslt snippet will select the value of the only value element:
<xsl:variable name="select"
  select="document('variables.xml')/variables/variable/value"/>

XPath to the value is:
/variables/variable/value

So you should know the exact path to the value you want. I think I am 
missing something here, since this _really_ is basics...


Cheers,
Jarkko

| 
|  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.