Validation algorithm for attribute-element constraints of RELAX NG

Patterns of RELAX NG can represent interdependencies between attributes and elements. Such patterns are useful for schema authors. However, they make validator implementation algorithmically challenging, since naive approaches easily blow up even for typical inputs. James Clark has provided a derivative-based validation algorithm for handling such interdependencies. This paper shows another algorithm, which is based on automata rewriting. When the validator encounters an attribute set, it rewrites automata that are constructed from patterns. Then, the validator examines an element sequence by executing the rewritten automata for the sequence. Advantages of our algorithm are compactness and portability. Validation algorithm for attribute-element constraints of RELAX NG Table of