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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: two little DOM2 questions...

[ Lists Home | Date Index | Thread Index ]
  • From: Stefan Haustein <haustein@ls8.cs.uni-dortmund.de>
  • To: Ray Whitmer <ray@xmission.com>
  • Date: Fri, 07 Jan 2000 12:02:01 +0100

Ray Whitmer wrote:
> 
> Perhaps the word "unpredictable" might be replaced with "suprising" or "undesirable".
> 
> Level 1 methods preserve level 1 behavior, including where colon may be used as a
> non-namespace-delimiting character.  Intermixing level 1 methods with level 2 methods can
> produce quite unexpected results, which are nonetheless strictly predictable from the spec, I
> believe.
> 
> There are some simple cases where I believe intermixing does work, including:
> 
> 2.  If a level 2 parser produces a level 2 DOM hierarchy, always setting the prefixes in
> addition to the namespaceURIs, which is then exclusively traversed and manipulated by a level
> 1 application.
> 

Are you sure? As far as I know, prefixes can have different 
bindings at different levels in the hierarchy, manipulating 
the tree may result in invalid prefixes in DOM1 and DOM2. 
In DOM2 you have a chance to "repair" the prefixes while 
writing out the tree since I know the namespace URI....

The methods I was talking about were mainly attribute access 
methods. What I would expect is that they use the elment 
namespace as a default. In a plain DOM1 situation, the 
element has no namespace, and DOM1 behavior is preserved.  

But in the current specification this is not fixed. Thus,
the DOM1 read methods will work in most cases, but will
deliver unpredictable results when I have two attributes 
with the same local name but different namespaces. That
seems very dangerous to me. 

Best regards 

Stefan

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

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

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