OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: Namespaces/XSchema Spec - XSchema Element (Sections 2.0 and 2.1), Dr

[ Lists Home | Date Index | Thread Index ]
  • From: "Simon St.Laurent" <SimonStL@classic.msn.com>
  • To: "Xml-Dev (E-mail)" <xml-dev@ic.ac.uk>
  • Date: Tue, 4 Aug 98 23:44:13 UT

Two ideas I _really_ like, though I'm not 100% sure of their acceptability.

First, from John Cowan:
> <!ATTLIST XSchema
>	xmlns:XSC CDATA #FIXED "(XSchema URI)"
>	xmlns CDATA #FIXED "(XSchema URI)">
>thus making either XSC or null a valid prefix for XSchema.  Then
>all XSchema elements are declared in the DTD with no colons except
>XSC:Doc and XSC:More, which have ATTLIST declarations thus:
>	xmlns CDATA #FIXED "">
>	xmlns CDATA "">
>and likewise for XSC:More.  Then within the XSC:Doc and XSC:More
>elements there is no default prefix, which is what IBTWSH wants.
>XSC:More users can override this with an explicit xmlns attribute.

Basically, the point of this is to allow XSchema declarations to use the 
default namespace, while still allowing the components under Doc and More to 
have 'freedom of namespace' or somesuch.  (I'll probably make XSC:Doc implied, 
not fixed.)

Is this practice acceptable?  The XSC prefix will have to be used on both 
XSC:Doc and XSC:More because they assign the default namespace to something 
other than the XSchema identifier.  I don't see any reason the same URN can't 
be used twice, and end up equivalent.  If it's kosher, it's going in.


The second provides for more flexible prefix handling within XSchemas, and 
will have a direct impact on Section 3.0 more than 2.0.

The second idea, for avoiding namespace collisions within XSchema, comes from 
Peter Murray-Rust:
> <!DOCTYPE XSC SYSTEM "XSchema.dtd" [
> <!-- help - a collision - let's override FOO -->
> <!ENTITY foo "newFOO">
> <!ENTITY foo "FOO">
> ]>
> <ElementDecl Name="&foo;:bar">
>   <Empty/>
> </ElementDecl>
> <AttDef Element="&foo;:bar" Name="xmlns:&foo;" Type="CData" Required="Yes" 
> AttValue="&foo; URI"/>
>That allows a single change in the XSchema definition file to percolate
>through the whole file. I actually think this is cleaner and more powerful
>than PEs for maintenance.

This works to some extent, allowing the XSchema designer to change the prefix, 
but it still requires changes in the XSchema and not just in the document 
instance.  There are other fun things we could do, like adding an attribute to 
XSC:XSchema elements that identifies the namespace in which they live via the 
URN (forget the prefix), but I'm really not sure what's best here.

All suggestions, public or private, are welcome.

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

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS