[examplotron] Re: Advanced handling of attributes

From: Jonathan Lang <dataweaver42@yahoo.com>
Date: Wed Jul 09 2003 - 03:47:52 UTC

Here's a revised syntax proposal:

   valueMarkup ::= '{' define? content occurs? default? '}'
   define ::= NCName '='
   content ::= 'eg:text' | pattern | ref
   occurs ::= '~' | '?' | '!' | '*' | '+'
   default ::= '=' literal
   pattern ::= value | data | choice
   ref ::= NCName
   value ::= datatype? literal
   data ::= datatype paramList? exclPattern?
   choice ::= pattern '|' choice
   datatype ::= QName
   paramList ::= '(' param '=' literal (',' param '=' literal)? ')'
   exclPattern ::= '-' pattern

You'll note that I replaced "." with "!" and "-" with "~" in the 'occurs'
term; that's because one of the possibilities for content is a name, and
both "." and "-" are valid choices for a name's final character. However,
the change wasn't made just to resolve that bit of ambiguity;
aesthetically I much prefer "!" to "." for the purpose of denoting a
pattern which must occur exactly once (it looks a little like the number
'1', it stands out more, and it's got more of a connotation of certainty
than a '.' has), and I likewise prefer '~' to '-' (the latter carries a
connotation of "this element or attribute is forbidden", rather than "this
element or attribute is an annotation". You might consider depreciating
the "." and "-" values in @eg:occurs as well, while introducing "!" and
"~" as alternatives.

=====
Jonathan "Dataweaver" Lang

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
Received on Wed Jul 9 05:47:56 2003

This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:29:47 UTC