|
[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?
Amit Rekhi wrote: > Ronald Bourret wrote: > > > 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. > > 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 more.So > 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 each other. 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: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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








