W3C home > Mailing lists > Public > www-archive@w3.org > September 2001

BXSN: Basic XML Schema Notation

From: Sean B. Palmer <sean@mysterylights.com>
Date: Thu, 27 Sep 2001 03:23:33 +0100
Message-ID: <049001c146fb$84f3f280$a8d993c3@y0r1d9>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 November 2012 14:17:14 GMT