[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: If I want to use catalogs for XSDs, must documentinstances
On Fri, 2012-04-20 at 15:33 +0800, Graham Hannington wrote: > [...] > When an XML document instance contains the > following schemaLocation attribute: > > xsi:schemaLocation="http://www.atlassian.com/schema/confluence/4/ac/ > confluence.xsd" > > my understanding is that catalog-aware XML applications (such as XMLSpy) > look at the first part of that attribute value No. In this case they should look at the confluence.xsd part. For example, if your XML document was hosted at http://www.example.org/docs/argyle.xml, then the XML Catalog would be consulted for http://www.example.org/docs/confluence.xsd. See http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/#schema-loc : The semantics of schemaLocation are that the first item is the namespace name and the second is the location of a schema document providing definitions for names in that namespace. But this does not mean such a schema document is the _only_ schema, or an _authoratative_ schema desrcibing names in that namespace. There is no such thing as a schema defining a namespace, because XML doesn't have that concept -- a namespace is just a URI that you can associate with names in XML documents if you like. [...] > Also this: > > > There is no direct mapping between namespace URIs and Schema documents > I think a direct mapping between a namespace URI and a > schema document is exactly the process that I've just described above, and > is exactly what that uri element in a catalog does: > > <uri name="http://www.atlassian.com/schema/confluence/4/ac/" > uri="confluence.xsd"/> > > If this uri element does not directly map a namespace URI to a schema > document, what does it do? > > Finally: > > > the relationship is that Schema documents may define elements associated > with one or more namespace URIs. > > I'm not saying that you're asserting otherwise, but I want to confirm that > my current understanding in this area is correct. I think that one schema > document (XSD; a single .xsd file) can define elements associated with > only one namespace URI (its target namespace). See the "chameleon" schema pattern for a counter-example. Second, a Schema Document can be comprised of multiple xsd files. Neither I nor the XSD spec uses Schema Document to mean a single xsd file. > I hope you don't think that I'm challenging you. That's not my intention. It wouldn't be a problem if you were, it's OK :-) On the other hand it's 4am so I might not be all that coherent... Liam -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
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
|