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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] WD for Namespaces 1.1

[ Lists Home | Date Index | Thread Index ]

 From: "james anderson" <james.anderson@setf.de>
 
> in order to avoid this problem it is necessary to implement a more
> complete inference mechanism than that suggested by [1] and implemented
> by microsoft. where one performs constriant propagation in the type
> domain [2] one can incorporate the declarations in the document entity
> and "retrofit" existing dtd's. 

If namespace-aware DTDs worked so that an element declared with no 
namespace declaration had an implied declaration of a null namespace,
what propagation is needed?

So given
<!DOCTYPE x [
    <!ELEMENT x (y)>
    <!ELEMENT y ANY>
    <!ATTLIST x  xmlns CDATA #FIXED "a namespace URI">
]>
then
    <x><y/></x>
is valid
    <x:x xnmls:x="a namespace URI"><y/></x:x>
is valid, but
    <x xnmls="a namespace URI"><y/></x>
is invalid, because the instance processor reports that y is in 
the namespace "a namespace URI" because of scoping
according to the namespace rules, but when it checks the
schema, y has no namespace.

The point being that, unlike XML Schemas, you are not
defining all the elements in a namespace: you are defining
a document type for which each element must be explictly
namespaced.  Namespace scoping happens in the document,
not from the LHS to the RHS of an element declaration.

Presumably some idiom like
  <!ENTITY % myNamespace " xmlns CDATA #REQUIRED 'a namespace URI' ">
  <!ATTLIST x %myNamespace; >
  <!ATTLIST y %myNamespace; >
would be useful. 

Cheers
Rick Jelliffe




 

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

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