We have a current system that outputs an XML file which is in the following format:
-
something<
Here is probably the simplest solution that will convert any children-elements of ITEM to its attributes and will reproduce everything else as is, while converting the element names to any desired attribute names:
when the above transformation is applied on the provided XML document:
-
something
something
something
the wanted result is produced:
Do note the following:
The use of the identity rule
The use of
The use of the variable vrtfNameMapping without any xxx:node-set() extension function.
The fact that we handle any mapping between a name and a newName, not only simple lower-casing.