I have to transform the following xml content,
200057<
Switching from imperative "pull" processing (
) to "push" processing, where you depend on the natural processing loop of the XSL engine, simplifies the stylesheet significantly.
This is essentially an "identity transform" plus one template to match Standard
, and output only what we want from within it. The template for x:RelatedProduct
copies those elements to the output verbatim and adds the RelationType
element whose text is the name of the containing element.
Output is
200057
ISO
1001
1500163
DraftProducts
263973
708519
ReferenceProducts
320056
934789
ReferenceProducts
116881
Identical
NEN ISO 1001
RelatedIntProducts
208076
116886
Identical
RelatedIntProducts
1001
1986
200058
ISO
1002
1500167
DraftProducts
263974
708519
ReferenceProducts
320052
934754
ReferenceProducts
116837
Identical
NEN ISO 1001
RelatedIntProducts
208074
116843
Identical
RelatedIntProducts
1005
1983