This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
"It's important to remember that the URI used for the XML namespace should be unique to that markup language, but it doesn't have to point to an actual resource or document." states RM. I understand the comment and get the idea that the namespace-engendered uniqueness will ensure that there are no collisions in names so the prefix is more important than the actual presence. But am I right in saying that if we are validating a document then the schemaLocation URI has to point to an actual schema but the URI for the other standard namespaces still do not have to physically point to anything because the document is only validated against the schema defined in the schemaLocation and the rest of the namespaces are just there to confer uniqueness. Please clarify.
Yes, I think you understood it correctly.
The namespace name is just a string (URI) that may happen to look like an URL. Some examples:
The XML schema specification says that the second URI in the schemaLocation attribute value is only a hint on where the schema document for the namespace in question may be found. Reference: http://www.w3.org/TR/xmlschema-0/#schemaLocation Best wishes!
Joined: Jan 29, 2010
Thanks Ivan for the clarification and your study notes. I am currently going through your study notes and they seem to be a fairly comprehensive resource.
For validation, the parser has to know the actual details of the schema, so "the schemaLocation attribute value is only a hint on where the schema document for the namespace in question may be found" presumably just means that either use the given location or if you have already obtained the schema details and put them in your cache then use that for efficiency.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Clarifying about namespace URI and validation