[xsl] one element relative to another question

Subject: [xsl] one element relative to another question
From: "Bruce Rojas-Rennke" <brr@xxxxxxx>
Date: Wed, 27 Aug 2003 17:01:56 -0600
Hey gang

Currently I am selecting the dollar values from the 'ColData' child nodes of
elements 'DataRow" (see below xml snippet). No problem there...

<xsl:for-each select="ColData[@colID='7']">
  <xsl:value-of select="@value"/>
</xsl:for-each>

Question:
How do I determine the value of TextRow/@value when I am evaluating the
DataRow/ColData/@values below? I need to see if the amount will belong in my
Current or 1-30 column of the xsl stylesheet. I am traversing the elements
in an alphabetical order so the orig order of the xml doc is shot to hell,
and I haven't the luxury of modifying format of below xml code..

------------- xml snippet --------------------------------------

<reportData>

  <TextRow rowNumber="1" value="Current" />
  <DataRow rowNumber="2">
    <ColData colID="4" value="American Express Gold (71000)" />
    <ColData colID="7" value="132.57" />
  </DataRow>
  <DataRow rowNumber="3">
    <ColData colID="4" value="Verizon Wireless (1005-1324318)" />
    <ColData colID="7" value="66.55" />
  </DataRow>

  <TextRow rowNumber="29" value="1 - 30" />
  <DataRow rowNumber="30">
    <ColData colID="2" value="2003-07-31" />
    <ColData colID="4" value="Sound Connection Inc." />
  </DataRow>
  <DataRow rowNumber="31">
    <ColData colID="2" value="2003-07-19" />
    <ColData colID="4" value="Qwest (303 679-3233-318R)" />
  </DataRow>

</ReprtData>

thank you thank you,
- Flashlight


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


Current Thread