I don't think you are necessarily limited to hierarchical
structures. In XML, there are the ID and IDREF attribute types to
reference entities outside the hierarchy.
For example, a Spring configuration file is essentially a graph:
You could make the argument that in this example "node1" is a child
of "node2" and "node3", but we could have created a "Tuple" element
that would relate nodes without a notion of ownership (and a "Graph"
element, which would collect of Tuples to be thorough).
On another note; I do dislike the attempts to force "programming" logic into XML, which is what XSLT does to some extent.
I generally find implementations of "scriptable"
XML to be incomprehensible.
I don't think you are necessarily limited to hierarchical
structures. In XML, there are the ID and IDREF attribute types to
reference entities outside the hierarchy.
For example, a Spring configuration file is essentially a graph:
You could make the argument that in this example "node1" is a child
of "node2" and "node3", but we could have created a "Tuple" element
that would relate nodes without a notion of ownership (and a "Graph"
element, which would collect of Tuples to be thorough).
On another note; I do dislike the attempts to force "programming" logic into XML, which is what XSLT does to some extent.
I generally find implementations of "scriptable"
XML to be incomprehensible.