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

referencing

Subject: referencing
From: Frank Hess <hess.frank@xxxxxx>
Date: Tue, 28 Nov 2000 14:38:32 +0100
value var1
Hi,

does someone know a solution to referencing to parameters given in the calling url by having the name of the parameter in an xml-tag

 <input>
 	<attribut>
 		<name>type</name>
 		<value>text</value>
 	</attribut>
  	<attribut>
 		<name>name</name>
 		<value>var1</value>
 	</attribut>
 	<attribut>
 		<name>value</name>
 		<value>$var1</value>
 	</attribut>
 </input>
 <input>
 	<attribut>
 		<name>type</name>
 		<value>text</value>
 	</attribut>
 	 <attribut>
 		<name>name</name>
 		<value>var2</value>
 	</attribut>
 	<attribut>
 		<name>value</name>
 		<value>$var2</value>
 	</attribut>
 </input>

The value of $var1 and $var2 should be replaces with the parameters given in th url e.g. http://somewhere/somewhat?var1=aaa&var2=bbb and i want to prduce the following output into a loop

<input type="text" name="var1" value="aaa">
<input type="text" name="var2" value="bbb">



<xsl:template match="input">
<xsl:element name="input">
  <xsl:for-each select="attribut">
   <xsl:attribute name="{name}">
    <xsl:value-of select="value"/>
  </xsl:attribute>
</xsl:for-each>
</xsl:element>
</xsl:template>

In this case the parameters $var1 and $var2 in the xml-section will be printed as they are:

<input type="text" name="var1" value="$var1">
<input type="text" name="var2" value="$var2">

Does some know a solution to evaluate these strings $var1 and $var2 given in an xml-tag?

Regards

Frank


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



Current Thread
  • referencing
    • Frank Hess - Tue, 28 Nov 2000 14:38:32 +0100 <=

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.