XML Schema Definition
(Updated category) |
|||
(2 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
{{FormatInfo | {{FormatInfo | ||
|formattype=electronic | |formattype=electronic | ||
− | |subcat= | + | |subcat=Schema formats |
− | + | ||
|extensions={{ext|xsd}} | |extensions={{ext|xsd}} | ||
− | |mimetypes= | + | |mimetypes={{mimetype|application/xml}}, {{mimetype|text/xml}} |
− | {{mimetype|application/xml}} | + | |pronom={{PRONOM|x-fmt/280}} |
− | {{mimetype|text/xml}} | + | |
|released=2001-05 | |released=2001-05 | ||
}} | }} | ||
Line 72: | Line 70: | ||
* [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:XML based file formats]] | ||
− | [[Category: | + | [[Category:Markup]] |
Latest revision as of 16:37, 14 August 2017
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
- W3C XML Schema 1.0 Specification
- W3C XML Schema 1.1 Specification
[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>