Processing a PurcahseOrder with XSL


I'm trying to process a PurchaseOrder according to this example. The problem is that I want to list the ListItems under each Shipment and the examples given in this documentation doesn't show how the LineItemIds node looks when it has children. Therefor I don't know how to write my XSL to get it right since the XML can't be viewed in any way I see possible. 

One strange thing is that on the OrderForm.Shipments.Shipment object i code behind the LineItems under each Shipment is called LineItemIndexes instead of LineItemIds and is of type string[]. The code I'm trying to use looks like this:

<xsl:template match="Shipment">
<xsl:for-each select="LineItemIds">
    <xsl:call-template name="LineItem">
        <xsl:with-param name="index" select="LineItemIds[0]">

Of course the LineItemIds[0] would be replaced with something from the for-each but what? And is the name LineItemIds correct or should it be LineItemIndexes. Tried both but nothing produce any output.

Removing the for-each and just calling it with the following code gives me the right node with index 3

<xsl:call-template name="LineItem">
    <xsl:with-param name="index" select="3">

So I just have to replace the select with the right index from Shipment LineItemIndexes (or LineItemIds)

May 08, 2012 15:16

Turned out that the LineItemIds wasn't in the XML at all. Changed to do the output not based on XSL/XML but used a UserControl instead and fecthed directly from the purchaseOrder object.

May 14, 2012 17:07
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.