I am a new bee in the XSL world and need to transform an XML ( A set of records in a table with hierarchical relation ship among the rows ) each element provides the info of its parent . Apologies for posting a big XML
PS : The root element is -1 ( Document Request ) and all elements with parentBlockiD -1 are children of the root element (DocumentRequest).
Relation ship definition :
1. <ns0:blockId>1</ns0:blockId> and <ns0:parentBlockId>-1</ns0:parentBlockId> define the parent Child relation ship #
2. If the Body ID is more than 1 . this means that the parent element has multiple instances of the child element .
I was able to generate it using DOM . but the solution is not scalable and has dependency on the target XSD .if there is any addition or deletion of an element I have to change the java code to absorb the change.