XSchema Spec, Sections 2.0 and 2.1 (Draft 1)

Simon St.Laurent SimonStL at classic.msn.com
Mon Jun 8 17:40:43 BST 1998


Finally, some real specs to abuse.  This is my first time out writing formal 
specifications, and undoubtedly there will be lots of things to fix.  All 
discussion is welcome - please make suggestions as you think appropriate!  
Remember - "readable, clear, and rigorous".

What follows is the beginning of the syntax descriptions, providing a 
description of the XSchema document and the XSchema element that serves as the 
parent element to all of the declarations.

I have posted a prettier HTML version of this to 
http://purl.oclc.org/NET/xschema .

Thanks for all the help,
Simon St.Laurent
Dynamic HTML: A Primer / XML: A Primer / Cookies


-------------------------

2.0 XSchema Syntax

This section describes the XSchema document instance syntax.  The XSchema 
document is an XML document containing a single XSchema element in which 
information describing the schema is nested. The XSchema element must be 
preceded by an XML declaration and may be preceded by other declarations, 
comments, and processing instructions. 

2.1 The XSchema Element

The XSchema element is the root element for all XSchema documents.  The 
declaration for the XSchema element is:

<!ELEMENT XSC:XSchema (Doc?, (ElementDecl | Entity | Notation | Namespace | 
XSchema)*)>
<!ATTLIST XSC:XSchema
    XSC:Version CDATA #FIXED "1.0"
    XSC:MimeType CDATA "application/xml"
    XSC:FileExtension CDATA "xml">

The XSC:XSchema element contains other elements describing the XSchema and 
building a schema.  These elements are described in later sections of this 
specification.  The XSC:XSchema element may also contain other XSC:XSchema 
elements nested inside of it.

The XSC:XSchema element's attributes include information about the version of 
XSchema used as well as information about the type of documents created using 
the XSchema. 

XSchema version information, contained in the XSC:Version attribute, is 
critical to proper handling of documents should the specification be updated 
in the future.  This specification is identified as version 1.0. Future major 
and minor versions of XSchema should identify themselves differently.  No 
provision is made at this time for nesting XSchemas of different versions 
under a parent XSchema element.

The XSC:MimeType and XSC:FileExtension attributes are used to provide a 
suggested MIME (Multipurpose Internet Mail Extensions) Content-type and file 
extension for documents created using a particular XSchema.  Applications may 
use this information to identify XML document types.  A document library that 
generates XML documents dynamically could assign file extensions and MIME 
types based on the XSchema used.  

Applications using this information should use the values stored in the first 
XSchema encountered during processing.  For instance, if an XSchema includes 
another nested XSchema, the values for the XSC:MimeType and XSC:FileExtension 
attributes of the root XSchema should be used.

By default, most XML documents are assumed to have a MIME type of 
application/xml, as described in "XML Media Types" by E.J. Whitehead and 
Murata Makoto.  Developers who need different MIME types for documents created 
using particular XSchemas may register other MIME types with the IETF, as 
described in RFC 1590, or use the 'x-' prefix syntax for subtypes, as 
described in RFC 1521.

Simon St.Laurent
Dynamic HTML: A Primer / XML: A Primer / Cookies


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