Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - understanding noNamespaceSchemaLocation >Thread Next - Re: understanding noNamespaceSchemaLocation Re: understanding noNamespaceSchemaLocationTo: 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/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
