Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: understanding noNamespaceSchemaLocation

From: Peter Flynn <peter.nosp@-.--------.-->
To: NULL
Date: 1/7/2007 4:22:00 PM

cartoper@g... wrote:
> XML, Schemas, and XSLT has been part of my life for a number of years
> now, but I have always used it in desktop application where I simply
> make the noNamespaceSchemaLocation attribute the name of the schema
> because it is going to reside in the same location as the xml file.
> 
> I am now working on a project that is a bit more complex.  Again part
> is a desktop application which will not have access to the Internet all
> the time, but another part of the project does have access to the
> Internet.  It is my understanding that within the XML, it is possible
> to provide a URL as the namespace name.

It's the other way around: a namespace name MUST be a URI. The URI 
syntax allows for interpretation as a local filename, either relative to 
the current location or absolute to your local hard disk, or as a 
network resource (starting with http://, ftp://, etc)...however, the use 
of local names is deprecated in namespaces.

I'm afraid noNamespaceSchemaLocation is just an unpleasant kludge: the 
Namespaces Spec says "It is not a goal that it [the namespace name] be 
directly usable for retrieval of a schema (if any exists)."

> How exactly do I go about setting up the XML so that when it is
> validated on the desktop application, I can simply provide the schema
> like I always have and then on the web it uses the URL as the source.

You need to ask your software manufacturer for any non-standard feature 
they may have provided. It's also a bit risky. What happens if the local 
copy and the network copy go out of sync?

It's a great pity Schemas were not implemented using the DOCTYPE 
declaration like DTDs, then we would have had PUBLIC and SYSTEM catalog 
resolution at our disposal. Unfortunately this would have entailed 
another TC to ISO 8879 and another tedious decade teaching developers 
how to do catalog resolution properly.

///Peter
-- 
XML FAQ: http://xml.silmaril.ie/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent