A Missing Pattern: Unordered Group
We have seen that the interleave
pattern
associates two different features and is both an unordered group and
something that alters the way subgroups can be combined. These two
features aren’t totally independent because mixing
child nodes is meaningful only when the order of the subgroups
isn’t maintained, but they aren’t
totally dependent either. In theory, it’s possible
to define a pattern with a meaning of
"unordered group” that
doesn’t interleave child nodes and keeps groups
unaltered.
This pattern doesn’t exist in RELAX NG for two reasons. First, it helps keep the language as simple as possible. Also, although it is built on top of an abstract mathematical model, RELAX NG is also built on top of the experience of its authors who have wanted to focus on general usages and best practices amongst the XML community. The lack of a “unordered group with no interleaving” hasn’t been reported as a real-world limitation so far.
Get RELAX NG now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.