XML Schema Definition

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{FormatInfo |formattype=electronic |subcat=Markup |subcat2=XML |extensions={{ext|xsd}} |mimetypes= {{mimetype|application/xml}}<br> {{mimetype|text/xml}} |released=2001-05 }}...")
 
(Updated category)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{FormatInfo
 
{{FormatInfo
 
|formattype=electronic
 
|formattype=electronic
|subcat=Markup
+
|subcat=Schema formats
|subcat2=XML
+
 
|extensions={{ext|xsd}}
 
|extensions={{ext|xsd}}
|mimetypes=
+
|mimetypes={{mimetype|application/xml}}, {{mimetype|text/xml}}
{{mimetype|application/xml}}<br>
+
|pronom={{PRONOM|x-fmt/280}}
{{mimetype|text/xml}}
+
 
|released=2001-05
 
|released=2001-05
 
}}
 
}}
 
 
An '''XML Schema Definition''' (XSD) is a file defining a particular set of data types and structural rules for a class of [[XML]] documents, which is itself expressed in XML form. The standard for it was adopted by the W3C (World Wide Web Consortium) in May, 2001. It was intended as a more flexible and extensible method of defining XML file format characteristics than the older method of using [[DTD]]s (Data Type Definitions), since a document can have only one DTD, but can have multiple XSDs to define namespaces used in the document.
 
An '''XML Schema Definition''' (XSD) is a file defining a particular set of data types and structural rules for a class of [[XML]] documents, which is itself expressed in XML form. The standard for it was adopted by the W3C (World Wide Web Consortium) in May, 2001. It was intended as a more flexible and extensible method of defining XML file format characteristics than the older method of using [[DTD]]s (Data Type Definitions), since a document can have only one DTD, but can have multiple XSDs to define namespaces used in the document.
  
Line 23: Line 20:
 
**[http://www.w3.org/TR/xmlschema11-1/ XSD 1.1 Structures]
 
**[http://www.w3.org/TR/xmlschema11-1/ XSD 1.1 Structures]
 
**[http://www.w3.org/TR/xmlschema11-2/ XSD 1.1 Datatypes]
 
**[http://www.w3.org/TR/xmlschema11-2/ XSD 1.1 Datatypes]
 +
==Example==
 +
<pre><?xml version="1.0" encoding="UTF-8"?>
 +
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
 +
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
 +
jaxb:extensionBindingPrefixes="xjc"
 +
elementFormDefault="unqualified"
 +
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0">
  
== Other links ==
+
  <xs:element name='FrostMessage'>
 +
    <xs:complexType>
 +
      <xs:sequence>
 +
        <xs:element name='MessageId' type="xs:string">
 +
        </xs:element>
 +
        <xs:element name='InReplyTo' type="xs:string">
 +
        </xs:element>
 +
        <xs:element name='IdLinePos' type="xs:integer">
 +
        </xs:element>
 +
        <xs:element name='IdLineLen' type="xs:integer">
 +
        </xs:element>
 +
        <xs:element name='From' type="xs:string">
 +
        </xs:element>
 +
        <xs:element name='Subject' type="xs:string">
 +
        </xs:element>
 +
        <xs:element name='Date' type="xs:string">
 +
        </xs:element>
 +
        <xs:element name='Time' type="xs:string">
 +
        </xs:element>
 +
        <xs:element name='Body' type="xs:string">
 +
        </xs:element>
 +
        <xs:element name='Board' type="xs:string">
 +
        </xs:element>
 +
        <xs:element name='PubKey' type="xs:string">
 +
        </xs:element>
 +
        <xs:element name='Signature' type="xs:string">
 +
        </xs:element>
 +
        <xs:element name='SignatureV2' type="xs:string">
 +
        </xs:element>
 +
      </xs:sequence>
 +
    </xs:complexType>
 +
  </xs:element>
 +
</xs:schema></pre>
 +
 
 +
== See also ==
 +
* [[XSD data types]]
 +
 
 +
== Links ==
 
* [[Wikipedia:XML Schema (W3C)|Wikipedia article]]
 
* [[Wikipedia:XML Schema (W3C)|Wikipedia article]]
 
* [http://www.dmoz.org/Computers/Data_Formats/Markup_Languages/XML/Validation/XML_Schema/ Open Directory Project page]
 
* [http://www.dmoz.org/Computers/Data_Formats/Markup_Languages/XML/Validation/XML_Schema/ Open Directory Project page]
 
* [http://www.w3.org/2001/03/webdata/xsv XML Schema Validator]
 
* [http://www.w3.org/2001/03/webdata/xsv XML Schema Validator]
 +
 +
[[Category:XML]]
 +
[[Category:XML based file formats]]
 +
[[Category:Markup]]

Latest revision as of 16:37, 14 August 2017

File Format
Name XML Schema Definition
Ontology
Extension(s) .xsd
MIME Type(s) application/xml, text/xml
PRONOM x-fmt/280
Released 2001-05

An XML Schema Definition (XSD) is a file defining a particular set of data types and structural rules for a class of XML documents, which is itself expressed in XML form. The standard for it was adopted by the W3C (World Wide Web Consortium) in May, 2001. It was intended as a more flexible and extensible method of defining XML file format characteristics than the older method of using DTDs (Data Type Definitions), since a document can have only one DTD, but can have multiple XSDs to define namespaces used in the document.

DFDL (Data Format Definition Language) is a variety of XSD with additional annotations to specify particular (binary or text) data file formats in a file which can be of a non-XML variety, allowing arbitrary file formats to be mapped onto particular XML file formats encompassing their content and structure.

Contents

[edit] Specs

[edit] Example

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
	jaxb:extensionBindingPrefixes="xjc"
	elementFormDefault="unqualified"
	xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0">

  <xs:element name='FrostMessage'>
    <xs:complexType>
      <xs:sequence>
        <xs:element name='MessageId' type="xs:string">
        </xs:element>
        <xs:element name='InReplyTo' type="xs:string">
        </xs:element>
        <xs:element name='IdLinePos' type="xs:integer">
        </xs:element>
        <xs:element name='IdLineLen' type="xs:integer">
        </xs:element>
        <xs:element name='From' type="xs:string">
        </xs:element>
        <xs:element name='Subject' type="xs:string">
        </xs:element>
        <xs:element name='Date' type="xs:string">
        </xs:element>
        <xs:element name='Time' type="xs:string">
        </xs:element>
        <xs:element name='Body' type="xs:string">
        </xs:element>
        <xs:element name='Board' type="xs:string">
        </xs:element>
        <xs:element name='PubKey' type="xs:string">
        </xs:element>
        <xs:element name='Signature' type="xs:string">
        </xs:element>
        <xs:element name='SignatureV2' type="xs:string">
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

[edit] See also

[edit] Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox