7

How do I use the 1.1 XML Schema definition?

This is what I'm starting with:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="object"></xs:element>
</xs:schema>
C. K. Young
  • 219,335
  • 46
  • 382
  • 435
scottmgerstl
  • 765
  • 8
  • 18
  • Could be answered here: http://stackoverflow.com/questions/21555511/how-to-indicate-that-an-xml-schema-that-requires-schema-1-1-features ? – Michael Feb 01 '17 at 13:40

2 Answers2

2

There's nothing in the schema document itself that indicates whether it's a 1.0 or a 1.1 schema. (Other than a nice big comment at the start, of course.) You just have to make sure that you invoke a 1.1 XSD processor if the schema uses any 1.1 features.

Michael Kay
  • 156,231
  • 11
  • 92
  • 164
  • 2
    Excellent. And HOW can I make it sure? – Gangnus Feb 08 '14 at 16:18
  • For example by invoking the Saxon schema processor with -xsdversion:1.1, or read the documentation for the schema processor you are using. – Michael Kay Feb 08 '14 at 16:25
  • Oh, Thank you so much. And when I am writing scheme on the Eclipse Tools, and the version is obviously 1.0, what can I do? Just now I have been searching internet for a solution and can't find anything. So it cannot be done as "simply do that" – Gangnus Feb 08 '14 at 16:35
  • I don't know Eclipse at all well, so I don't know. I'm sure there is a way with Eclipse to invoke either Xerces or Saxon to process XSD 1.1 schemas, but I don't know what it is! – Michael Kay Feb 10 '14 at 18:51
0

This question was asked out of lack of understanding. There are apparently no changes that need to be made to the Schema declaration. The functionality of 1.1 is just available within the same namespace as 1.0. 1.1 is just the abstract name of the extended functionality

scottmgerstl
  • 765
  • 8
  • 18