[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

  • From: "Simon St.Laurent" <SimonStL@c...>
  • To: "Xml-Dev (E-mail)" <xml-dev@i...>
  • Date: Tue, 4 Aug 98 23:44:13 UT

xmlns urn
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:
> 
> <!ATTLIST XSC:Doc
>	xmlns CDATA #FIXED "">
> <!ATTLIST XSC:More
>	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@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.