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"> </xsl:with-param> </xsl:call-template></xsl:for-each>
Of course the LineItemIds 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"> </xsl:with-param></xsl:call-template>
So I just have to replace the select with the right index from Shipment LineItemIndexes (or LineItemIds)
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.