Basic XML Schema Declarations

An XML Schema document is built of a series of declarations, which gives very detailed information and makes sure the information contained in the XML document is in the correct form.































































Declaration NamePurposeSyntax
SchemaIdentifies the language the schema uses<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
ElementDefines an element<xsd:element name="name">
AttributeDefines an attribute<xsd:attribute name="name"
type="type">
Complex typeDefines an element that contains other elements, contains
attributes, or contains mixed content (elements and text)
<xsd:complexType>
Simple typeCreates a constrained datatype for an element or attribute
value
<xsd:simpleType>
Sequence compositorSpecifies that attributes or elements within a complex type
must be listed in order
<xsd:sequence>
Choice compositorSpecifies that any one of the attributes or elements within a
complex type can be used
<xsd:choice>
All compositorSpecifies that any or all attributes or elements within a
complex type can be used
<xsd:all>
AnnotationContains documentation and/or appInfo elements that provide
additional information and comments about the schema document
<xsd:annotation>
DocumentationProvides human-readable information within an annotation<xsd:documentation>
Application informationProvides computer-readable information within an
annotation
<xsd:appInfo>



dummies

Source:http://www.dummies.com/how-to/content/basic-xml-schema-declarations.html

No comments:

Post a Comment