RE: display in a recursive wayy

Subject: RE: display in a recursive wayy
From: Eileen Kinley <e.kinley@xxxxxxxxxx>
Date: Tue, 25 Apr 2000 22:40:44 -0400
Here's my problem again!!

(I'll shut up now ...)

> -----Original Message-----
> From:	Mike Brown [SMTP:mike@xxxxxxxx]
> Sent:	Tuesday, April 25, 2000 10:07 PM
> To:	xsl-list@xxxxxxxxxxxxxxxx
> Subject:	Re: display in a recursive wayy
> 
> > What do we need to add to the program to make these item display in a 
> > recursive way? 
> 
> This explanation applies to pure XSLT, and you're using MSXML, but I
> believe it still applies:
> 
> The xsl:value-of instruction makes a text node containing what would
> happen if you called the string() function on the XPath expression in the
> select attribute. string() on some node-set returns the string-value of
> the first node in the set.
> 
> So for example, you have multiple 'item' element children of the current
> node, when processing the 'detail' element. <xsl:value-of select="item"/>
> in that situation will give you the results you are seeing.
> 
> You want to iterate through nodes, like:
> 
> <xsl:for-each select="item">
>   <td><xsl:value-of select="."/></td>
> </xsl:for-each>
> 
> However you may find that your XML is not very well structured for this
> kind of iteration. Right now you have, essentially:
> 
> <purchase_order>
>   <data/>
>   <detail>
> 
>     <item/>
>     <itemdesc/>
>     <amount/>
> 
>     <item/>
>     <itemdesc/>
>     <amount/>
> 
>     <!-- ... -->
> 
>   </detail>
> </purchase_order>
> 
> The grouping of item information is difficult to work with when it's like
> this. If you put each set of item details in its own containing element,
> it would be much easier to iterate through the containers with a for-each.
> 
> 
>    - Mike
> ___________________________________________________________
> Mike J. Brown, software engineer, Webb Interactive Services
> XML/XSL stuff: http://www.skew.org/    http://www.webb.net/
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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


Current Thread