|
Subject: [xsl] get child tag value From: "Mikael Petterson (KI/EAB)" <mikael.petterson@xxxxxxxxxxxx> Date: Tue, 29 Nov 2005 15:48:09 +0100 |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Problem with obtaining di, Dimitre Novatchev | Thread | Re: [xsl] get child tag value, David Carlisle |
| [xsl] Problem with obtaining distin, Ian E. Powell | Date | Re: [xsl] Problem with obtaining di, Ragulf Pickaxe |
| Month |