W3C home > Mailing lists > Public > xml-names-issues@w3.org > October to December 1998

Default Namespace should be clearly documented and supported by specific <TAG> type

From: Bryan Cooper <bryan.cooper@veritas.com>
Date: Mon, 30 Nov 1998 11:29:06 -0800
Message-Id: <199811301928.LAA06695@mailhub1.ncal.verio.com>
To: xml-names-issues@w3.org
Cc: xml-dev@ic.ac.uk
Some of my email was eaten up on the way out.
I am resending these comments to hopefully make some sort of sense,
assuming they made some sort of sense in the first place...thanx

I would like the namespace specification to show examples of how to
switch the default namespace using a clear tagging convention.  
I'd REALLY like to see a generalized <!EVENT> notation used
for that tagging convention.

I'd like to see an example of how to do the following:

< HTML>
< P>
<different_ns:push_new_context_for_namespace_example>
< P>
< /different_ns:push_new_context_for_namespace_example>
</HTML>

In the DTD, I'd like to see this type of syntax:

< !EVENT push_new_context_for_namespace_example xnmls="different_ns"
TYPE="push"/>

The first < P> MUST BE < HTML>, and
the second < P> would be automatically
default namespace parsed as belonging to the 2nd namespace different_ns.  
It wouldn't require in the DTD any namespace declarations so the
parser wouldn't need to check namespace for every TAG in the document.
The parser would merely push the current default using this EVENT TAG.

This approach simplifies the need to tag ENTITIES
at all, but instead lets the parser know which default namespace
is in effect.   I am concerned that the specification requires ENTITIES to
change
the namespace, when in fact a parser directed command is really preferable.
I think otherwise all ENTITIES are going to have namespace overhead in
their DTD.
I think the parser will then spend too much time determining which namespace
each TAG uses.  Or maybe the spec doesn't allow namespace declaration in
the DTD.
That would be VERY difficult to support since then the application creating
the 
doc would probably put namespace declarations on every doc TAG.  That's
alot of overhead.

The EVENT is a new type of entity and the TYPE statement 
could become more explicit in XML over time to support different types 
of parser specific tweaks.  THe idea is to allow the DTD to define
a specific TAG that pushes the namespace context until end of TAG.

I assume I could use an ENTITY for this but then I should have the ENTITY
cover all the possible ENTITIES in the DTD in terms of encapsulation.
An EVENT type would NOT require encapsulation of ENTITIES, but rather
would be clearly a parser directed command.

Is this supported by the draft?  It wasn't clear from the example
that a namespace change tag is supported by the DTD as a specific type of 
"switch default namespace tag", but I think it is available.  I'd just like to
see it clearly documented in the spec, and I am suggesting the EVENT
addition to XML as a means of making it even more explicit.  

The DTD should clearly allow the definition of the context switch
tag in "different_ns" such as shown above in 
< different_ns: push_new_context_for_namespace_example>.

These tags would be then be the only tags requiring the namespace prefix,
since all included tags must then be supported by the "different_ns",
UNLESS they include a different namespace prefix.  In fact, the
use of the different namespace prefix is just a one time example
of pushing the context to a different namespace.  The example in
the spec implies that all enclosed tags will be in the different
namespace.  It should also show that specified namespace
prefix tags do NOT cause such as shift, but rather are one time only
for the TAG:

< HTML>
< different_ns:P>
< P> in HTML
< /HTML>

 
...bryan

F. Bryan Cooper	 		707 823 7324 
VERITAS Software      		707 321 3301 mobile
Bryan.Cooper@veritas.com   
Received on Monday, 30 November 1998 14:28:15 GMT

This archive was generated by hypermail 2.2.0 + w3c-0.30 : Tuesday, 12 April 2005 12:17:17 GMT