XML Schema Definition

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Merged in from XML Schema Description)
Line 9: Line 9:
 
|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.
  

Revision as of 23:42, 17 April 2015

File Format
Name XML Schema Definition
Ontology
Extension(s) .xsd
MIME Type(s) application/xml
text/xml
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.

Specs

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>

Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox