Re: XML Schema language version
Michael Kay <[email protected]> Thu, 10 Oct 2013 09:58:23 +0100
| Newsgroups | gmane.text.xml.schema.devel |
|---|---|
| Message-ID | <[email protected]> |
Yes, the exclusive nature is a bit of a pain. I would use values like =
max=3D1.0001 or max=3D1.1001.
Michael Kay
Saxonica
On 10 Oct 2013, at 09:19, George Cristian Bina wrote:
> Thanks Mike for this suggestion!
>=20
> We will implement this algorithm in oXygen:
>=20
> if (there are vc:minVersion or vc:maxVersion attributes on the schema =
root element) then {
> if (version 1.1 is accepted)
> then (use XML Schema version 1.1)
> else if (version 1.0 is accepted)
> then (use XML Schema version 1.0)
> else (throw unsupported schema version error)
> } else (use the default XML Schema version specified in oXygen =
options)
>=20
> It is unfortunate that, as Andreas mentioned, the maxVersion is =
exclusive. For example, if we will add new document templates to allow =
users to easily create XML Schema 1.0 and XML Schema 1.1 document by =
setting the vc:* attributes the templates will look like this:
>=20
> for XML Schema 1.0:
>=20
> <xs:schema xmlns:xs=3D"http://www.w3.org/2001/XMLSchema"
> xmlns:vc=3D"http://www.w3.org/2007/XMLSchema-versioning"
> vc:maxVersion=3D"1.1"
> elementFormDefault=3D"qualified">
>=20
> </xs:schema>
>=20
> for XML Schema 1.1
>=20
> <xs:schema xmlns:xs=3D"http://www.w3.org/2001/XMLSchema"
> xmlns:vc=3D"http://www.w3.org/2007/XMLSchema-versioning"
> vc:minVersion=3D"1.1"
> elementFormDefault=3D"qualified">
>=20
> </xs:schema>
>=20
> and as you can see people will easily get confused about the =
maxVersion=3D"1.1" in the XML Schema 1.0 documents.
> This also makes difficult to specify an XML Schema 1.1 only document, =
because what shall be used for maxVersion? 1.2, 2, 2.0, 1.1.1?
>=20
> Best Regards,
> George
> --
> George Cristian Bina
> <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
> http://www.oxygenxml.com
>=20
> On 10/2/13 11:12 PM, Michael Kay wrote:
>> I think it would be a creative but perfectly reasonable =
interpretation of the XSD 1.1 specification to advise users to set =
vc:minVersion=3D"1.0" or vc:minVersion=3D"1.1" or vc:maxVersion=3D"1.0" =
on the xs:schema element to indicate whether they expect to use a 1.0 =
processor or a 1.1 processor for the schema, and for an IDE such as =
oXygen to use this attribute when selecting a processor to run.
>>=20
>> See http://www.w3.org/TR/xmlschema11-1/#cip
>>=20
>> Michael Kay
>> Saxonica
>>=20
>> On 2 Oct 2013, at 20:55, C. M. Sperberg-McQueen wrote:
>>=20
>>>=20
>>> On Sep 26, 2013, at 2:58 AM, George Cristian Bina wrote:
>>>=20
>>>> Hi all,
>>>>=20
>>>> We introduced XML Schema 1.1 support in oXygen some time ago. As =
there is no way to specify the version of the XML Schema language we =
added an application option that controls what version is in use. By =
default XML Schema 1.1 is selected and we show a notification to the =
user informing him that we use XML Schema 1.1 with two options:
>>>> Continue with 1.1
>>>> Switch back to 1.0
>>>> After the user chooses one of these options this notification =
disappears and is not presented again, the user being able to change the =
XML Schema version from the oXygen preferences and even specify a =
specific value for each project.
>>>>=20
>>>> One problem we encountered with a number of users is that they =
choose to continue with XML Schema 1.1 and then they forget about this. =
They develop XML Schema 1.1 schemas and deploy them to users using XML =
Schema 1.0 tools, without being aware that they are using XML Schema 1.1 =
features in their schemas.
>>>>=20
>>>> Not having a mechanism of setting the XML Schmea language version =
inside the schema file makes difficult working with XML Schema 1.0 and =
XML Schema 1.1 files in the same time.
>>>>=20
>>>> We can add of course an oXygen specific way of specifying the XML =
Schema language version required to process a specific XML Schema in the =
form of a PI or an annotation but it will be useful to see if there is =
more interest in having this functionality and then find a better way to =
specify and implement this so that people can use the same syntax and =
have that understood by more tools. Maybe a W3C Note will be a good =
choice for specifying this, similar to the xml-model PI for associating =
a schema with a document.
>>>=20
>>> It certainly seems that the two decisions (a) not to put any version =
identifier
>>> into an XSD 1.0 schema, and (b) not to change the namespace in XSD =
1.1,
>>> working together, were a mistake.
>>>=20
>>> I believe the URIs specified in XSD 1.1 for denoting specific =
versions of
>>> XSD should be useful here -- at least, they provide a standard way =
to say
>>> things like "XSD 1.0" and "XSD 1.1".
>>>=20
>>>=20
>>> --
>>> ****************************************************************
>>> * C. M. Sperberg-McQueen, Black Mesa Technologies LLC
>>> * http://www.blackmesatech.com
>>> * http://cmsmcq.com/mib
>>> * http://balisage.net
>>> ****************************************************************
>>>=20
>>>=20
>>>=20
>>>=20
>>>=20
>>=20
>=20