I'm looking for a BNF/EBNF of XML Schema. I just found the one for XML (http://www.w3.org/TR/REC-xml or extracted at http://www.jelks.nu/XML/xmlebnf.html).
Well it's a starting point, but I'm curious that I couldn't find a more specific one for XML Schema.
I guess because nobody finds that useful, and it would be too complex. If somebody want to define an XML language, such as XML Schema, they would probably use XML primitives like elements or attributes (using XML Schema, Relax NG, DTD, etc.), not characters. One of the reasons XML was invented is to have a meta language for creating other languages.
I think the fiirst step would be to start with the xsd for XML Schema and to use Colibri to generate a bnf grammar.
I will check when i m back home. The Colibri's author say:
Il s'agit là d'un premier jet que nous pourrions affiner.
But i definitevly think it got potential.
来源:https://stackoverflow.com/questions/1578100/bnf-ebnf-for-xml-schema