Lists Home |
Date Index |
- From: Ronald Bourret <email@example.com>
- To: xml list <firstname.lastname@example.org>
- 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:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)