W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2000

Re: XML Schema syntax

From: Richard E. Rathmann <Richard.Rathmann@noaa.gov>
Date: Thu, 03 Feb 2000 15:18:48 -0500
Message-Id: <4.1.20000203140014.00a1ba40@mailsrv.csc.noaa.gov>
To: www-xml-schema-comments@w3.org

I agree with Philip Wadler that the syntax of the XML Schema specifications. 
As I personally come to the XML development community without any formal
computer programming training, the various XML specifications coming out of the
W3C which use it have been my first and only exposure to Backus-Naur Form
(BNF).  I can see how BNF is useful at an early stage for roughing out an
abstract syntax for defining the structure of grammars like that of XML Schema,
but as most of us currently wishing to make use of XML Schemas already know and
understand XML DTDs, a more concrete syntax alternative such as a DTD fragment
would probably be more beneficial to developers.  I find Appendix A, The Schema
for Schemas, even easier to understand than the BNF equivalents.

However, I somewhat "straddle the fence" with Philip's desire of using
<repeat>, <choice>, and <sequence> rather than the more generic <group>.  I can
certainly sympathize with his view that the former three elements are clearer
in their intended use than the latter, but I can also see how the Schema WG
might have opted for the more generic element to keep the structures as simple
as possible without relinquishing functionality in the process, as well as
allow for future extensibility to the language.

For those that would prefer elements like <repeat>, <choice>, and <sequence>
rather than those like <group>, correct me if I'm wrong, but XML Schema itself
can solve this dilemma.  With the fact that XML Schemas are written in XML
(including the schema for XML Schema) allowing generic XML parsers and
authoring tools to work with schemas, along with the fact that the XML Schema
language describes mechanisms for element equivalence and element type
extension/restriction, one can add onto the "core" schema for XML Schemas.  For
example:

         . . .

        <!-- xsd: prefix is associated with the schema for XML Schemas -->
        <type name="choice" source="xsd:group" derivedBy="restriction">
                <attribute name="order" fixed="choice"/>
        </type>

        <!-- xsdplus: prefix is associated with this schema, which
imports/includes the original XML Schema schema -->
        <element name="choice" source="xsdplus:choice" equivClass="group"/>

        . . .



Richard Rathmann 



Richard E. Rathmann
TPMC Web Designer at the NOAA Coastal Services Center
2234 South Hobson Avenue  ~  Charleston, SC  29405-2413
(843) 740-1314 (voice)  ~  (843) 740-1224 (fax)
Richard.Rathmann@noaa.gov (e-mail)  ~  http://www.csc.noaa.gov (web)

*** Note new e-mail address ***
Received on Thursday, 3 February 2000 15:19:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:46 GMT