XSchema Spec, Section 3, Draft 1 (Namespaces)
Simon St.Laurent
SimonStL at classic.msn.com
Wed Jul 1 17:13:16 BST 1998
>i thought that's what the namespace pi was for.
Then you've missed my point.
The namespace PI applies namespaces to documents - namespace-aware
applications should expand the prefix to the full name provided in the ns
production. XSchemas need one of these for the XSC: stuff, and extensions
(the XSC:More area) will require additional declarations for their extension
namespaces.
For instance, an XSchema in the current version will begin:
<?xml version="1.0"?>
<?xml:namespace ns="http://www.purl.org/NET/XSchema/v1" prefix="XSC"?>
<XSC:XSchema>
<XSC:Namespace ns="http://simonstl.com/" prefix="NewSpace">
<XSC:Doc>The namespace above is a total waste of time</XSC:Doc>
</XSC:Namespace>
<XSC:ElementDecl name="NewSpace:WasteOSpace">
<XSC:Empty/>
</XSC:ElementDecl>
</XSC:XSchema>
The exciting document might look like:
<?xml version="1.0"?>
<?PI to be determined linking in XSchema?>
<?xml:namespace ns="http://simonstl.com" prefix="SillySpace"?>
<SillySpace:WasteOSpace/>
The XSchema could instead have been written:
<?xml version="1.0"?>
<?xml:namespace ns="http://www.purl.org/NET/XSchema/v1" prefix="XSC"?>
<?xml:namespace ns="http://simonstl.com/" prefix="NewSpace"?>
<!--The namespace above is a total waste of time -->
<XSC:XSchema>
<XSC:ElementDecl name="NewSpace:WasteOSpace">
<XSC:Empty/>
</XSC:ElementDecl>
</XSC:XSchema>
But as you can see, the namespace declaration has to appear both places in one
form or another for the src information to line up if the prefix changes, as
is likely. Since we're making the rest of the declarations more documentable,
why not namespaces? It gets them out of the way and gives them a good home
within the XSchema, where they can be documented, manipulated, and edited with
relative ease.
Actually, I'm beginning to consider namespaces a plot to keep authors from
meeting their deadlines rather than a great help to society. I've got to turn
in chapters tomorrow, so I'll be off the air for the rest of today.
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