XSLT to transform an XML document - (problem with accessing outer xsl:for-each nodes)
I have a requirement to transform an XML document to ROWSET/ROW document in PLSQL. I wonder if you could suggest an XSLT for doing this job. The following are the XML document and the required output. As you will notice, <ShipmentLine> and <LotInfo> could occure more than once in the xml document.
Thanks,
Majid
<DataArea>
<Dispatch>
<DispatchId>dispatchid</DispatchId>
</Dispatch>
<ShipmentLine>
<PartId>ShipmentLin1</PartId>
<LotInfo>
<LotId>ShipmentLin1-lotid1</LotId>
<LotQuantity>ShipmentLin1-lotquantity1</LotQuantity>
</LotInfo>
<LotInfo>
<LotId>ShipmentLin1-lotid2</LotId>
<LotQuantity>ShipmentLin1-lotquantity2</LotQuantity>
</LotInfo>
</ShipmentLine>
<ShipmentLine>
<PartId>
<Id>ShipmentLine2</Id>
</PartId>
<LotInfo>
<LotId>ShipmentLine2-lotid1</LotId>
<LotQuantity>ShipmentLine2-lotquantity1</LotQuantity>