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] Namespace declaration versus attribute

[ Lists Home | Date Index | Thread Index ]

On Tue, Aug 20, 2002 at 09:07:40AM -0700, Kian-Tat Lim wrote:
>Amy! Lewis wrote:
>> Add namespace-awareness to the processor, and both examples are now
>> DTD-valid.
>
>	Nope.  Since the DTD hasn't changed, and DTD validation
>pays no attention to Namespaces, both are still invalid.
>To make the first valid, you'd have to have an attribute
>declaration for xmlns.  To make the second valid, you'd have
>to change the element declaration to ns:root and add the
>attribute declaration for xmlns:ns.  Additionally, with some
>varieties of MS parser, I believe you need to make the xmlns
>attributes #FIXED.

That seems to make sense, but isn't true in my experience.  I haven't used
the MS parser; I've used various parsers for Java and maybe a couple for
Perl and Python and the like.

In those parsers, if namespace recognition is turned on, a namespaced
instance can be validated against a namespace-less (by definition) DTD. 
Mixing namespaces is pretty impossible, but otherwise it works fine.  Both
of the given examples were validated.  Possibly I'm using different parsers,
or configuring them differently, though, than what you've seen.

Amy!
-- 
Amelia A. Lewis       amyzing@talsever.com      alicorn@mindspring.com
According to Business Week, in the 1990s the ratio between a chief
executive's salary and the takehome pay of the typical, feckless, 
whining grunt on the shopfloor rose from 85:1 to 475:1. (In the UK, 
which is seeing a vigorous popular backlash against "fat cat" pay 
packets, the ratio is 24:1).
               -- The Register




 

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

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