XSD: Document instance syntax goal
Paul Prescod
papresco at technologist.com
Tue May 26 22:17:56 BST 1998
Simon St.Laurent wrote:
>
> 1. SDDs shall use XML document syntax.
This is a little more vague than I would prefer. Here's a DTD-like schema
in document syntax notation:
<?XML version="1.0"?>
<SCHEMA>
<![CDATA[
<!ELEMENT ...>
<!ATTLIST ...>
]]>
</SCHEMA>
This is an exaggeration, because we aren't likely to do that, but we might
be tempted to use #PCDATA for content models.
The essential point, I think, is that SDDs should use element nesting and
XLinks to describe *all* constraints that should be checkable by the
computer. The only required character data should be descriptions of
things. The only CDATA attributes should be XLinks.
Perhaps for version 2.0 it would make sense to have an optional encoding
that uses #PCDATA content models etc. I don't think that it is so terrible
to require tool vendors to build small parsers inside of their XML
applications. XPointers require that, for instance. But it is better to
use element nesting for version 1.0:
* Implementation is easier, because the API is predictable (element
events in SAX or element nodes in DOM)
* Rigorous specification is easier, because we don't need to have BOTH a
DTD and a BNF to describe SDDs
* A DTD smart editor can guide SDD creation "all of the way down".
Paul Prescod - http://itrc.uwaterloo.ca/~papresco
Three things to be wary of: A new kid in his prime
A man who knows the answers, and code that runs first time
http://www.geezjan.org/humor/computers/threes.html
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list