HTML and CSS Reference
In-Depth Information
An XML Schema Definition is an XML file and starts with an XML processing
statement. The general form of the XML processing instruction is shown in Table 12-8.
Table 12-8 General Form of a Processing Instruction
General form:
<?target attribute1="value" attribute2="value"?>
The ? identifies this as a processing instruction. The target is the name of the application. The
attributes and values tell the processor how to handle the statement. The values assigned to the
attributes can be enclosed in single or double quotation marks, as long as they are consistent.
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
The next statement in the XML Schema Definition is the <xs:schema> root
element. This statement contains a namespace declaration. Table 12-9 shows a simple
root element with namespace declaration for a single XML file.
Table 12-9 General Form of a Root Element
Root element:
<xs:schema xmlns:xs=""
The xs is the namespace. The xmlns is XML namespace location and associates the xs to the
schema of all schemas at the Web site. The most commonly used namespaces are xs or xsd.
The optional elements within the brackets include targetNamespace that associates other
namespace items with the designated URI. The xmlns defines the default namespace location
and the elementFormDefault indicates the definition must be a qualified namespace.
<xs:schema xmlns:xs="">
Developers add documentation to their XML Schema Definition files using the
<annotation> and <documentation> tags. Documentation should include descriptions of all
changes made to files by whom and when. In the XML Schema Definition, <annotation>
and <documentation> tags are used. Table 12-10 describes the general format of the
<annotation> and <documentation> tags in an XML Schema Definition file.
Table 12-10 General Form of Annotation and Documentation Elements
General form:
<namespace:annotation [id="value" | other attributes]>
<namespace:documentation [source=URI | xml:lang="language">
Descriptive text
The <annotation> element is the top-level tag for descriptive documentation. The
<annotation> tag may have an optional id or other nonschema attributes.
The <documentation> element denotes that the text within the opening and closing tags is
nonschema data. The <documentation> tag may have an optional Web source of information.
The xml:lang attribute identifies the language of the documentation content.
This XSD describes the data structure of Calumet Restaurant Supply products created
July 13, 2014 by S.Sims.
Search WWH ::

Custom Search