|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] get child tag value
Hi,
In my xml I have the following data:
<parameter name="measType">
<dataType>
<long>
<range>
<min>3</min><max>4</max>
<min>5</min><max>6</max>
...............
xsl
==
............................
<xsl:choose>
<!-- Make constants for input parameters -->
<xsl:for-each select="parameter">
<xsl:variable name="range_const_name">
public static final<xsl:text> </xsl:text><xsl:call-template
name="dataType"/><xsl:call-template name="Camel2Underscore">
<xsl:with-param name="str"
select="@name"/></xsl:call-template></xsl:variable>
<xsl:for-each select="dataType">
<xsl:call-template name="action_in_parameter_value"><xsl:with-param
name="range_const_name" select="$range_const_name"/>
<!-- I need an additional parameter for the dataType. It is defined in
the child tag with different data type names -->
<!-- <xsl:with-param name="data_type" select="."/>-->
</xsl:call-template>
</xsl:for-each>
</xsl:for-each>
</xsl:when>
<xsl:template name="action_in_parameter_value">
<!-- range_const_name is : public static final int MEAS_TYPE
So for each <min> <max> pair I want to print the follwing:
public static final int MEAS_TYPE_VALUE = 3;
public static final int MEAS_TYPE_VALUE = 4;
public static final int MEAS_TYPE_VALUE = 5;
public static final int MEAS_TYPE_VALUE = 6;
-->
</xsl:template>
Since the child to <dataType> varies I am not sure how I can accomplish this.
Any ideas?
cheers,
//mikael
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








