Re: XML Schema language version
"Timothy W. Cook" <[email protected]> Thu, 10 Oct 2013 07:35:40 -0300
| Newsgroups | gmane.text.xml.schema.devel |
|---|---|
| Message-ID | <CA+=OU3WEtGUnCLz8E3Oq964mKwVejJJ7kMSXaYN6Zp=wPV2L0Q@mail.gmail.com> |
--047d7b33d9803187bb04e8609037 Content-Type: text/plain; charset=UTF-8 Thanks for this addition to oXygen. The maxVersion issue needs to be fixed in the specs. I think everyone agrees that the current definition is just non-sensical. On Thu, Oct 10, 2013 at 5:19 AM, George Cristian Bina <[email protected]>wrote: > Thanks Mike for this suggestion! > > We will implement this algorithm in oXygen: > > 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) > > 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: > > for XML Schema 1.0: > > <xs:schema xmlns:xs="http://www.w3.org/**2001/XMLSchema<http://www.w3.org/2001/XMLSchema> > " > xmlns:vc="http://www.w3.org/**2007/XMLSchema-versioning<http://www.w3.org/2007/XMLSchema-versioning> > " > vc:maxVersion="1.1" > elementFormDefault="qualified"**> > > </xs:schema> > > for XML Schema 1.1 > > <xs:schema xmlns:xs="http://www.w3.org/**2001/XMLSchema<http://www.w3.org/2001/XMLSchema> > " > xmlns:vc="http://www.w3.org/**2007/XMLSchema-versioning<http://www.w3.org/2007/XMLSchema-versioning> > " > vc:minVersion="1.1" > elementFormDefault="qualified"**> > > </xs:schema> > > and as you can see people will easily get confused about the > maxVersion="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? > > > Best Regards, > George > -- > George Cristian Bina > <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger > http://www.oxygenxml.com > > 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="1.0" or >> vc:minVersion="1.1" or vc:maxVersion="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. >> >> See http://www.w3.org/TR/**xmlschema11-1/#cip<http://www.w3.org/TR/xmlschema11-1/#cip> >> >> Michael Kay >> Saxonica >> >> On 2 Oct 2013, at 20:55, C. M. Sperberg-McQueen wrote: >> >> >>> On Sep 26, 2013, at 2:58 AM, George Cristian Bina wrote: >>> >>> Hi all, >>>> >>>> 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. >>>> >>>> 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. >>>> >>>> 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. >>>> >>>> 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. >>>> >>> >>> 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. >>> >>> 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". >>> >>> >>> -- >>> ******************************************************************** >>> * C. M. Sperberg-McQueen, Black Mesa Technologies LLC >>> * http://www.blackmesatech.com >>> * http://cmsmcq.com/mib >>> * http://balisage.net >>> ******************************************************************** >>> >>> >>> >>> >>> >>> >> > -- MLHIM VIP Signup: http://goo.gl/22B0U ============================================ Timothy Cook, MSc +55 21 94711995 MLHIM http://www.mlhim.org Like Us on FB: https://www.facebook.com/mlhim2 Circle us on G+: http://goo.gl/44EV5 Google Scholar: http://goo.gl/MMZ1o LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook --047d7b33d9803187bb04e8609037 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Thanks for this addition to oXygen.=C2=A0<div>The maxVersi= on issue needs to be fixed in the specs. =C2=A0I think everyone agrees that= the current definition is just non-sensical.=C2=A0</div><div><br></div></d= iv><div class=3D"gmail_extra"> <br><br><div class=3D"gmail_quote">On Thu, Oct 10, 2013 at 5:19 AM, George = Cristian Bina <span dir=3D"ltr"><<a href=3D"mailto:[email protected]"= target=3D"_blank">[email protected]</a>></span> wrote:<br><blockquot= e class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc sol= id;padding-left:1ex"> Thanks Mike for this suggestion!<br> <br> We will implement this algorithm in oXygen:<br> <br> if (there are vc:minVersion or vc:maxVersion attributes on the schema root = element) then {<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (version 1.1 is accepted)<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 then (use XML Schem= a version 1.1)<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 else if (version 1.= 0 is accepted)<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 then (use XML Schema version 1.0)<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 else (throw unsupported schema version error)<br> } else (use the default XML Schema version specified in oXygen options)<br> <br> 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:* attr= ibutes the templates will look like this:<br> <br> for XML Schema 1.0:<br> <br> <xs:schema xmlns:xs=3D"<a href=3D"http://www.w3.org/2001/XMLSchema"= target=3D"_blank">http://www.w3.org/<u></u>2001/XMLSchema</a>"<br> =C2=A0 xmlns:vc=3D"<a href=3D"http://www.w3.org/2007/XMLSchema-version= ing" target=3D"_blank">http://www.w3.org/<u></u>2007/XMLSchema-versioning</= a>"<br> =C2=A0 vc:maxVersion=3D"1.1"<br> =C2=A0 elementFormDefault=3D"qualified"<u></u>><br> <br> </xs:schema><br> <br> for XML Schema 1.1<br> <br> <xs:schema xmlns:xs=3D"<a href=3D"http://www.w3.org/2001/XMLSchema"= target=3D"_blank">http://www.w3.org/<u></u>2001/XMLSchema</a>"<br> =C2=A0 xmlns:vc=3D"<a href=3D"http://www.w3.org/2007/XMLSchema-version= ing" target=3D"_blank">http://www.w3.org/<u></u>2007/XMLSchema-versioning</= a>"<br> =C2=A0 vc:minVersion=3D"1.1"<br> =C2=A0 elementFormDefault=3D"qualified"<u></u>><br> <br> </xs:schema><br> <br> and as you can see people will easily get confused about the maxVersion=3D&= quot;1.1" in the XML Schema 1.0 documents.<br> This also makes difficult to specify an XML Schema 1.1 only document, becau= se what shall be used for maxVersion? 1.2, 2, 2.0, 1.1.1?<div class=3D"im H= OEnZb"><br> <br> Best Regards,<br> George<br> --<br> George Cristian Bina<br> <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger<br> <a href=3D"http://www.oxygenxml.com" target=3D"_blank">http://www.oxygenxml= .com</a><br> <br></div><div class=3D"HOEnZb"><div class=3D"h5"> On 10/2/13 11:12 PM, Michael Kay wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> I think it would be a creative but perfectly reasonable interpretation of t= he XSD 1.1 specification to advise users to set vc:minVersion=3D"1.0&q= uot; 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 proce= ssor or a 1.1 processor for the schema, and for an IDE such as oXygen to us= e this attribute when selecting a processor to run.<br> <br> See <a href=3D"http://www.w3.org/TR/xmlschema11-1/#cip" target=3D"_blank">h= ttp://www.w3.org/TR/<u></u>xmlschema11-1/#cip</a><br> <br> Michael Kay<br> Saxonica<br> <br> On 2 Oct 2013, at 20:55, C. M. Sperberg-McQueen wrote:<br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> <br> On Sep 26, 2013, at 2:58 AM, George Cristian Bina wrote:<br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> Hi all,<br> <br> We introduced XML Schema 1.1 support in oXygen some time ago. As there is n= o way to specify the version of the XML Schema language we added an applica= tion 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 u= se XML Schema 1.1 with two options:<br> Continue with 1.1<br> Switch back to 1.0<br> After the user chooses one of these options this notification disappears an= d is not presented again, the user being able to change the XML Schema vers= ion from the oXygen preferences and even specify a specific value for each = project.<br> <br> One problem we encountered with a number of users is that they choose to co= ntinue with XML Schema 1.1 and then they forget about this. They develop XM= L Schema 1.1 schemas and deploy them to users using XML Schema 1.0 tools, w= ithout being aware that they are using XML Schema 1.1 features in their sch= emas.<br> <br> Not having a mechanism of setting the XML Schmea language version inside th= e schema file makes difficult working with XML Schema 1.0 and XML Schema 1.= 1 files in the same time.<br> <br> We can add of course an oXygen specific way of specifying the XML Schema la= nguage version required to process a specific XML Schema in the form of a P= I or an annotation but it will be useful to see if there is more interest i= n having this functionality and then find a better way to specify and imple= ment this so that people can use the same syntax and have that understood b= y more tools. Maybe a W3C Note will be a good choice for specifying this, s= imilar to the xml-model PI for associating a schema with a document.<br> </blockquote> <br> It certainly seems that the two decisions (a) not to put any version identi= fier<br> into an XSD 1.0 schema, and (b) not to change the namespace in XSD 1.1,<br> working together, were a mistake.<br> <br> I believe the URIs specified in XSD 1.1 for denoting specific versions of<b= r> XSD should be useful here -- at least, they provide a standard way to say<b= r> things like "XSD 1.0" and "XSD 1.1".<br> <br> <br> --<br> ******************************<u></u>******************************<u></u>*= ***<br> * C. M. Sperberg-McQueen, Black Mesa Technologies LLC<br> * <a href=3D"http://www.blackmesatech.com" target=3D"_blank">http://www.bla= ckmesatech.com</a><br> * <a href=3D"http://cmsmcq.com/mib" target=3D"_blank">http://cmsmcq.com/mib= </a><br> * <a href=3D"http://balisage.net" target=3D"_blank">http://balisage.net</a>= <br> ******************************<u></u>******************************<u></u>*= ***<br> <br> <br> <br> <br> <br> </blockquote> <br> </blockquote> <br> </div></div></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>= MLHIM VIP Signup: <a href=3D"http://goo.gl/22B0U" target=3D"_blank">http://= goo.gl/22B0U</a><br>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D<br>Timothy Cook, MSc =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 +55 21 94711995= <br> MLHIM <a href=3D"http://www.mlhim.org" target=3D"_blank">http://www.mlhim.o= rg</a><br>Like Us on FB: <a href=3D"https://www.facebook.com/mlhim2" target= =3D"_blank">https://www.facebook.com/mlhim2</a><br>Circle us on G+: <a href= =3D"http://goo.gl/44EV5" target=3D"_blank">http://goo.gl/44EV5</a><br> Google Scholar: <a href=3D"http://goo.gl/MMZ1o" target=3D"_blank">http://go= o.gl/MMZ1o</a><br>LinkedIn Profile:<a href=3D"http://www.linkedin.com/in/ti= mothywaynecook" target=3D"_blank">http://www.linkedin.com/in/timothywayneco= ok</a><br> </div> --047d7b33d9803187bb04e8609037--