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

FW: get child tag value

Subject: FW: get child tag value
From: "Mikael Petterson (KI/EAB)" <mikael.petterson@xxxxxxxxxxxx>
Date: Tue, 29 Nov 2005 16:03:56 +0100
get child tag
> 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

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.