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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: SAX2: Interning names in namespaces

[ Lists Home | Date Index | Thread Index ]
  • From: Stefan Haustein <stefan.haustein@trantor.de>
  • To: Terje Norderhaug <terje@in-progress.com>, xml-dev@xml.org
  • Date: Sat, 05 Feb 2000 13:46:18 +0100

> There has also been a discussion about how to encode names with an
> associated namespace, typically by merging the two into a string.
> Suggestions ranged from placing brackets around the namespace URI to
> separating the URI from the actual name with a space.

Do you know if an official recommendation for storing a
namespace-name pair in a single string exists? I switched 
to combined names in my application because they are much 
simpler to handle than pairs of separate string objects.

> The current SAX2 beta uses multiple strings to represent a name in its
> namespace. This has caused several of the methods in the recent beta of
> SAX2 to have a rather cluttered argument list compared to SAX1.
> I suggest that parsers interns each name as a separate string in the
> namespace it belong to. This should guarantee that two equal names in the
> same namespace are identical, and that two equal names in different
> namespaces are unidentical.

Sounds too complicated for broad acceptance, and I must admit that I do
see the great benefit. From an OOP point of view, it would probably be 
cleaner to have an own object or interface combining namespace, name and
providing corresponding compare methods, but this is a discussion we
had some time ago....

Best regards



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

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