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

RE: xsl:for-each - RETRIEVING ONLY ONE OCCURRENCE

Subject: RE: xsl:for-each - RETRIEVING ONLY ONE OCCURRENCE
From: "Mike Rudolph" <mrudolph@xxxxxxx>
Date: Thu, 20 Feb 2003 15:47:05 -0600
xsl for each only one
Mick and Ritu,

Thanks for the responses.  Here is a rundown of the solution:

1. What I thought was valid 'source' data, or XML, was not valid.  I tweaked
my upstream map to fix that.

2. Also, the snip of code I had in my email was not current.  I added the
</TR> that was obviously missing, and also wrapped all the commands withing
the xsl:for-each with another <TR>...</TR>.  Here is the updated version of
the code.

     <TABLE BORDER="4" WIDTH="100%" VALIGN="TOP" CELLPADDING="5">
     	  <COLGROUP ALIGN="CENTER"><TH COLSPAN="2">PART / REV</TH>
     	  <TH>STATUS</TH><TH>TIMING</TH><TH>UOM</TH><TH>QTY</TH>
     	  <TH>DELIVERY</TH></COLGROUP>
     	    <TR>
     	      <xsl:for-each select="FOR/ITEM_DETAIL">
              <TR><TD><xsl:value-of select="CUSTOMER_PART_NUM" /></TD>
              <TD><xsl:value-of select="PART_REV_LEVEL" /></TD>
              <TD><xsl:value-of select="FORECAST_STATUS_DESC" /></TD>
              <TD><xsl:value-of select="FORECAST_TIMING_DESC" /></TD>
              <TD><xsl:value-of select="UNIT_OF_MEASURE_DESC" /></TD>
              <TD><xsl:value-of select="QUANTITY" /></TD>
              <TD><xsl:value-of select="REQUEST_DELIVERY_DATE" /></TD></TR>
              </xsl:for-each>
            </TR>
     </TABLE>


Thanks again.

Mike

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Mick Storm
Sent: Thursday, February 20, 2003 1:47 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  xsl:for-each - RETRIEVING ONLY ONE OCCURRENCE


>              <TD><xsl:value-of select="QUANTITY" /></TD>
>             <TD><xsl:value-of select="REQUEST_DELIVERY_DATE" /></TD>
>              </xsl:for-each>

It looks like you are missing a </tr> before the </xsl:for-each>. Look
at the source of the HTML and see if the results are there, and are not
being rendered because of invalid HTML

-Mick Storm



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


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.