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] XML Schema Checklist

At 2012-10-20 10:52 -0300, Timothy Cook wrote:
>On Sat, Oct 20, 2012 at 8:56 AM, Costello, Roger L. 
><costello@mitre.org> wrote:
> >
> > Yes, true. However, I did specify 1.1 in my schema:
> >
> > <?xml version="1.1"?>
>I am still a bit confused about the using the version indicator.
>Since this list is just about my only communications about XML, I am
>certain it was here that I was told to use 1.0 even though my schema
>uses 1.1 specific capabilities such as multiple substitution groups.

You are mixing the concept of the XML version with the XSD version.

>So where should I stand on this?

Specifying version="1.1" in an XML document is solely talking about 
the characters (and other 1.1 features) of the XML document 
itself.  It says nothing about any validation constraints expressed 
by other languages, including W3C Schema.

>My  next question is then, should my XML instances (based on this
>schema) use version="1.0" or "1.1"

Neither use is based on the schema.  The use of version="1.0" or 
version="1.1" in an XML document is based solely on the content of 
the XML document.

And the XML 1.1 specification strongly suggests that when adding an 
XML declaration to an XML document, that version 1.1 is used only 
when some specific 1.1 feature is being exploited in the document ... 
if not, then XML 1.1 states that version="1.0" SHOULD be used:

   Programs which generate XML SHOULD generate XML 1.0, unless one
   of the specific features of XML 1.1 is required.

In Roger's examples, his W3C Schema expression, in an XML document, 
is using characters that are defined only by XML 1.1, thus his schema 
expression requires a declaration of those features.  But the schema 
itself could be version 1.0 or version 1.1, because that is the 
version of the schema validation semantics, not the version of the 
XML documents being validated.

>I get the impression that there is a lot of push back on using 1.1 But
>I have never discovered why or why not to use it.  I require some of
>the 1.1 specifics like the multiple substitution groups and asserts.

If you need W3C Schema 1.1, go ahead and use it based on your 
requirements.  But using it imposes no constraint on the XML 
declaration of an XML document being validated with W3C Schema (or 
any other constraint language).

I hope this helps distinguish the two very separate concepts for you.

. . . . . . . . . Ken

Contact us for world-wide XML consulting and instructor-led training
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/x/
G. Ken Holman                   mailto:gkholman@CraneSoftwrights.com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal

[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