- From: Sean B. Palmer <sean@mysterylights.com>
- Date: Thu, 27 Sep 2001 03:23:33 +0100
- To: <www-archive@w3.org>
BXSN is a subset of XML Schema, and an extension of DTD grammar, in a plain text form. It's actually pretty compact, and will hopefully prove useful. Here's a BNF for it:- file = *nsdecl 1*rule nsdecl = '$xmlns' +( ':' alpha *alphanum ) ' ' URIView nl rule = grprule | elemrule | attrrule | modrule grprule = grpname ' ' gramrule nl grpname = '%' qname gramrule = '(' elgr *( ( ',' | '|' ) elgr ) ')' +symbol elgr = qname | grpname | gramrule elemrule = *fullelemc fullelem +( '#' ) gramrule nl fullelem = qname ' ' fullelemc = qname ', ' attrrule = qname ' @>' nl 1*( ' ' attrule ) attrule = attr req ( ( type +default ) | fixed ) nl attr = '@' qname req = ' req:"' bool '"' type = ' type:"' qname '"' default = ' default:"' string '"' fixed = ' fixed:"' string '"' modrule = qname ' =>' nl 1*( ' ' elemrule ) qname = alpha *alphanum +( ':' alpha *alphanum ) alpha = [A-Za-z] alphanum = [A-Za-z0-9] bool = [01] nl = 1*( cr | lf | cr lf ) symbol = '?' | '+' | '*' It needs checking through and publishing. -- Kindest Regards, Sean B. Palmer @prefix : <http://webns.net/roughterms/> . :Sean :hasHomepage <http://purl.org/net/sbp/> .
Received on Wednesday, 26 September 2001 22:23:51 UTC