[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

  • From: Ronald Bourret <rbourret@i...>
  • To: xml list <xml-dev@i...>
  • Date: Tue, 17 Nov 1998 10:28:08 +0100

definations of names
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@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.