Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to declare I want to use XML Schema 1.1

Tags:

xml

xsd

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>
like image 238
scottmgerstl Avatar asked Jan 29 '13 20:01

scottmgerstl


People also ask

How do you specify the schema of XML file?

To create the schema we could simply follow the structure in the XML document and define each element as we find it. We will start with the standard XML declaration followed by the xs:schema element that defines a schema: <? xml version="1.0" encoding="UTF-8" ?>

How do I change the XML schema?

To edit a fileSelect the Use XML editor to view and edit the underlying XML Schema file link on the Start View. The XML editor appears with the new file open. Copy the XML Schema sample code from Purchase order schema and paste it to replace the code that was added to the new XSD file by default.


1 Answers

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.

like image 107
Michael Kay Avatar answered Sep 24 '22 00:09

Michael Kay