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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: How do XML NameSpace aware processors react to NS definations?

[ Lists Home | Date Index | Thread Index ]
  • From: Ronald Bourret <rbourret@ito.tu-darmstadt.de>
  • To: xml list <xml-dev@ic.ac.uk>
  • Date: Tue, 17 Nov 1998 10:28:08 +0100

Amit Rekhi wrote:

> >So for now, namespace-aware processors should do nothing more than
> >acknowledge the existence of the unique namespace.
> 
> This would mean that the NS processor would simply check for ":" in the
> element name, and on finding it, it would try finding the
> namespace declaration (of the kind xmlns="....") which matches prefix
> found. That's it.
> Am I right?

The NS processor (parser) would then return the namespace URL and element name to the application.  As yet, there is no standard way to do this, but one suggestion for SAX-based applications is to use a parser filter to concatenate the namespace URL and the element name, separated by a caret (^).  (See http://www.ccil.org/~cowan/XML/ )

> And the application on behalf of whom the XML NS processor is operating
> can take care of validating the namespaces if that's what it intends to do.
> Am I right?

If by "validating the namespaces" you mean checking that the prefix used in the element or attribute name has been declared, it seems more appropriate that if the parser claims to be namespace-aware, it would perform this task.  Similarly, if the parser was a validating parser, it would also do any validation.

In general, though, the application's responsibility to know what to do with the element.  This is no different from the non-namespace case: if I define an element <foo>, your parser will have no idea what to do with it -- that is my application's job.  The only difference when namespaces are introduced is that elements and attributes now have two-part names instead of one-part names.

-- Ron Bourret

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/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe 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