Lists Home |
Date Index |
- From: Ronald Bourret <email@example.com>
- To: xml list <firstname.lastname@example.org>
- Date: Thu, 19 Nov 1998 10:18:37 +0100
Amit Rekhi wrote:
> Ronald Bourret wrote:
> > If by "validating the namespaces" you mean checking that the prefix
> > the element or attribute name has been declared, it seems more
> > 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.
> Assuming that the parser is a validating NS aware parser,
> I was wondering what other validations could the parser perform.
> * It would be difficult for the parser to validate the content model,
> attributes of all the prefixed names against their definations in the DTD
> since the Namespace URI only signifies a unique identifier, nothing
> validating prefixed names in the way given above would be difficult.
> Am I right?
> Then what other validations are left which are relevant to namespaces?
You are confusing two different things: validation (meaning to enforce the
validity constraints in the XML spec) and enforcing the namespace
constraints in the namespaces spec. These are completely independent of
The program that processes the namespaces must enforce the namespace
constraints. Generally, this will be the parser or a layer (such as John
Cowan's namespace parser filter) built on top of the parser. In the case of
a namespace-aware, validating parser, the parser enforces this.
The program that performs validation enforces the validity constraints.
This is usually a validating parser. This program gets the information to
validate against from the DTD. It gets the DTD from the DOCTYPE statement;
the DOCTYPE statement always points to the DTD, regardless of whether
namespaces are used or not. As you point out, the parser does not get the
DTD from the namespace URI; the namespace URI is just a unique identifier
and does not necessarily point to anything.
-- 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)