XML Database (MOSC)

MOSC Banner

XSLT to transform an XML document - (problem with accessing outer xsl:for-each nodes)

edited Jun 19, 2013 10:27PM in XML Database (MOSC) 2 commentsAnswered ✓
Hi All,
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>

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center