Subject:No Topic Author:Minollo I. Date:16 Jul 2005 09:58 AM
I'm not sure on what you are looping, or what you want to create as an output; but I hope something like this can help to get you started:
...
<xsl:for-each select="CustomerOrder/OrderInformation/LineItems/Item">
The SKU is <xsl:value-of select="Field[@Name='SKU']/@Value"/>
...and its description is <xsl:value-of select="Field[@Name='Description']/@Value"/>
</xsl:for-each>
...
Basically, it's about posting policies. Each policy (<poldoc>) is very the same but some has attached file, some doesn't. And, it can be one or more than 2 attachments. I don't know how to loop through the XML file in order to pull out all attachments (if there is any)
Ivan <br>
It works, but not actually the way I want I changed the for select as the way you showed, it pulls out ALL attach elements. Well, what I'm looking for in layout result is if one has attachments then it should list only attachments belong to that one only, not ALL attachment found in XML Please Help....THANKS A LOT !!
For example: if <idno>5678</idno> has its own 2 attachments and <idno>9101<idno>also has its own 2 attachments.Then the result will show 2 attachments for <idno>5678</idno> and 2 attachments for <idno>9101</idno> separatedly. The method you showed me earlier, it show ALL attachments for any <poldoc> that has <attach> ... Hope you understand what I'm trying to say here .....