OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: XML Schemas: schemas without a targetNamespace

[ Lists Home | Date Index | Thread Index ]
  • From: Curt Arnold <CurtA@techie.com>
  • To: "Roger L. Costello" <costello@mitre.org>, xml-dev@lists.xml.org
  • Date: Sat, 26 Aug 2000 13:56:10 -0500

I've mentioned problems with this in a few messages on the schema
comments list and it is embedded in LC-117:

http://lists.w3.org/Archives/Public/www-xml-schema-comments/2000AprJun/0124
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2000AprJun/0159.html

In my opinion, if you are going to the effort of writing a schema, you
have a namespace and should assign it a namespace identifier.  Whether
you use it or not in an instance is something else and should be handled
in the binding, not the schema.  The current draft would require you to
have two distinct schemas for each flavor XHTML, one for when the
instance document declared the namespaces and another for when no
namespaces were declared.

In the current state, you would use xsi:noNamespaceSchemaLocation
(section 2.6.3 of the Schema Part 1)

 <?xml version="1.0"?>
      <BookCatalogue
              xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation= "BookCatalogue.xsd">
         ...
      </BookCatalogue>

The schema that you wrote would be required not to have a
targetNamespace attribute per section 6.3.2, point 3 (removal of that
restriction would eliminate the need for distinct schemas for namespaced
and non-namespace'd instances).

My recommendation would be to make targetNamespace required and remove
the requirement that a schema referenced from a
noNamespaceSchemaLocation have no targetNamespace attribute.




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS