referencing

Subject: referencing
From: Frank Hess <hess.frank@xxxxxx>
Date: Tue, 28 Nov 2000 14:38:32 +0100
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 <=