[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

  • From: Liam R E Quin <liam@w3.org>
  • To: Graham Hannington <graham_hannington@fundi.com.au>
  • Date: Fri, 20 Apr 2012 02:00:17 -0400

Re:  If I want to use catalogs for XSDs
On Fri, 2012-04-20 at 12:29 +0800, Graham Hannington wrote:
> If I want a catalog-aware XML application (such as jEdit with XML plugin, 
> or Altova XMLSpy 2012) to use a catalog to locate XSDs to validate XML 
> document instances, must the XML document instances contain schemaLocation 
> attributes?
No.


> I had hoped that perhaps these applications might look at the xmlns: 
> attribute values (namespace URIs) in a document instance, and use the 
> catalog to map these namespace URIs to the location of the corresponding 
> XSD files, but that does not work for me in practice.

Neither should it.

There is no direct mapping between namespace URIs and Schema documents;
the relationship is that Schema documents may define elements associated
with one or more namespace URIs. It's a many*/many* relationship: an XML
document might not use any namespaces at all and yet still have one or
more XML Schema documents used to validate it. You might use any of
several schema documents (or several at once) depending on your goals.

> 
> So, either:
> - The answer is "yes" (the document instances must contain schemaLocation 
> attributes)
> - The answer is "no", and I'm doing something wrong in my catalog

The answer is that you have to tell your schema processor how to find he
schemas, and that schemaLocation attributes are one way, but not the
only way - the program might have another way to do it - but doing it
based on namespace URIs would not be a good way.

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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.