[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Namespaces, schemas, and conformance
Sean B. Palmer writes: > Say I created a namespace for a language at http://infomesh.net/testns/ > Then, on the Web, there are two different XML documents:- > 1. <roota xmlns="http://infomesh.net/testns/"/> > 2. <rootb xmlns="http://infomesh.net/tesns/"/> > Here, the root elements, (and possibly the enitre definitions of the > langauges!) are different, but they use the same namespace! Which one is > definitive? You mean "which one is compliant" -- the documents can be definitive only in their own domains. The answer to your question is either, both, or neither, depending on how well the documents conform to the published specification for the Namespace. If the specification says In this Namespace, either the roota or the rootb elements may be used at the top level ... then they're both fine. If the documentation says In this Namespace the roota element shall be used at the top level if the document is designed for non-profit purposes, and the rootb element shall be used at the top level if the document is designed for commercial purposes ... then a human being is going to have to test conformance. Even with a schema, the documents have to conform to the published specification to be compliant -- schemas can catch only a very small percentage of conformance errors (they're a time-saving tool, not a silver bullet). All the best, David -- David Megginson david@m... http://www.megginson.com/
|
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
|