XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Need to import the XML schema namespace

Thanks, Liam.

I had never the seen it before today, but there seem to be several
Microsoft tools that generate (in WSDL documents)

<schema ...>
   <import namespace="http://www.w3.org/2001/XMLSchema";
schemaLocation="http://www.w3.org/2001/XMLSchema.xsd"; />
...

or the same import lacking the schemaLocation attribute.

That schema-for-schemas (non-normative copy of the normative schema in
the spec) does include declarations of the datatypes specified in Xml
Schema 1.0 part 2, which might likely be referenced in the importing
schema.  So it appears to be possible to import them, and in practice,
unnecessary.

Jeff

On 5/5/2010 9:08 PM, Liam R E Quin wrote:
> On Wed, 2010-05-05 at 20:47 -0700, Jeff Greif wrote:
>> Most XML Schemas in the wild reference some of the types in the
>> http://www.w3.org/2001/XMLSchema namespace, but they usually do so
>> without explicitly importing it, so it apparently unnecessary in
>> practice, if not normatively.
> 
>> I can't find any reference in the XML Schema 1.0 spec that says it is
>> either illegal or unnecessary to import this namespace, for example,
>> using xs:import.  Similarly, I can't find any further interoperability
>> guidelines on this subject in the WSI-Basic Profile 1.0.
> 
> xs:import does not "import a namespace" - it imports a schema that
> defines a vocabulary of elements and/or attributes associated with
> that namespace URI. This distinction is very important. You could
> not write a schema to define xs:integer or xs:string - they are
> fundamental building blocks. So, the Schema language has them as
> built-ins (in part 2 datatypes), and its neither necessary nor
> actually possible to "import" them.
> 
>> Does anyone have a reference to a definitive statement of whether this
>> import is required, optional or forbidden in XML Schemas that reference
>> the data types of this namespace?
> 
> It's a meaningless question, you'll be glad to know :-)
> 
> Or, it would be like asking which header file you #include in C or C++
> to get the keywords like "int" and "switch" and return"...
> 
> Hope this helps.
> 
> Liam
> 
> 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS