In DTDs and in XSD (I think also in RelaxNG, correct me if I’m wrong), a grammar for a content model is defined in terms of permitted sequences or choices of element names (where an element name in DTD is a lexical QName, and in XSD is an expanded QName). Attributes don’t come into it. In my Balisage paper on FtanML a couple of years ago I explored the idea of using a grammar where the alphabet consists of types, so the grammar could allow <p class=“table”> and disallow <p class=“figure”>. Michael Kay Saxonica |