Supposed I have the following XML file with nodes I would like to rearrange based on rules:
Some text
If you could have a rules.xml file living (for example) in the same directory as the XSLT stylesheet file, in (for example) the following format:
rules.xml
KeyA
KeyM
KeyZ
KeyL
KeyN
KeyP
you could then apply the following stylesheet to your input:
XSLT 1.0
to get the following result:
Some text
Some text
Some text
Some text
Some text
To suppress section rules that do not have matching subsections in the input document, try: