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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: SAX2: Namespace Processing and NSUtils helper class

[ Lists Home | Date Index | Thread Index ]
  • From: Ray Waldin <rwaldin@pacbell.net>
  • To: XMLDev list <xml-dev@ic.ac.uk>
  • Date: Thu, 16 Dec 1999 00:25:43 -0800

I'm only a user of SAX and not an implementor, but I've always expected SAX 2 to include
namespace scoping events.  It seems a bit restrictive to completely hide these events from
an application.  For example:

<element1 xmlns="uri1" xmlns:p2="uri2">
  <ns2:element2 foo="bar" xmlns:p3="uri3" p3:whiz="bang"/>
</element1>

would produce the following stream of events:

  startDocument();
  startNamespace( prefix=null, uri="uri1" );
  startNamespace( prefix="p2", uri="uri2" );
  startElement( name="element1", attrList=null );
  startNamespace( prefix="p3", uri="uri3" );
  startElement( name="p2:element2", attrList={ foo="bar", p3:whiz="bang" });
  endElement( name="p2:element2" )
  endNamespace( prefix="p3" );
  endElement( name="element1" );
  endNamespace( prefix="p2" );
  endNamespace( prefix="p1" );
  endDocument();

Simple management of these namespaces can be provided for in some helper class like the
NSUtils example, and can even be handled automatically for the most part in a new
HandlerBase2 class, but this decision of how (or whether) to handle namespaces could be
left to the application author.  Anyone else feel this way?

-Ray

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