Lists Home |
Date Index |
- From: "Simon St.Laurent" <SimonStL@classic.msn.com>
- To: "Xml-Dev (E-mail)" <email@example.com>
- 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:
> <!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,
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
> <!DOCTYPE XSC SYSTEM "XSchema.dtd" [
> <!-- help - a collision - let's override FOO -->
> <!ENTITY foo "newFOO">
> <!ENTITY foo "FOO">
> <ElementDecl Name="&foo;:bar">
> <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.
Dynamic HTML: A Primer / XML: A Primer / Cookies
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)