Frameworks like llama.cpp support context-free grammars to restrict the output of a large language model to a specific format.
The specification for the xml2rfc format comes with a RELAX NG schema that describes this particular format.
The RELAX NG specification defines its semantics based on a simpler format called the simple syntax. Some more advanced constructs are basically just syntactic sugar in this sense.
There are tools that convert the full format into the simple syntax.
The simple syntax is very easy to work for for all kinds of purposes.