Skip to Content

Flat to hierarchical target structure

Sample 3 target document structure

This flat-to-hierarchical transformation's target document is hierarchical, with at least one header row and multiple detail rows that are assigned to the header row. The structure is shown below:

<!ELEMENT inventory (snapshotinfo, warehouse+)>

<!ELEMENT snapshotinfo (snapshotdate, snapshotuser, snapshotsource)>

<!ELEMENT snapshotdate (#PCDATA)>

<!ELEMENT snapshotuser (#PCDATA)>

<!ELEMENT snapshotsource (#PCDATA)>

<!ELEMENT warehouse (warehouseinfo, instockitem+)>

<!ELEMENT warehouseinfo (warehousecode, warehousestate)>

<!ELEMENT warehousecode (#PCDATA)>

<!ELEMENT warehousestate (#PCDATA)>

<!ELEMENT instockitem (itemnumber, itemquantity, attribute*)>

<!ELEMENT itemnumber (#PCDATA)>

<!ELEMENT itemquantity (#PCDATA)>

<!ELEMENT attribute (attributecode, attributevalue)>

<!ELEMENT attributecode (#PCDATA)>

<!ELEMENT attributevalue (#PCDATA)>