> >So for now, namespace-aware processors should do nothing more than
> >acknowledge the existence of the unique namespace.
>=20
> 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=3D"....") 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