Databases Reference
In-Depth Information
Figure 5.8 Sample XML schema diagram showing how symbols are used to display document
structure. In this example, the file shows the structure of a collection of one to many topics. Each
topic has required elements (shown with darker lines, like id and title ) as well as optional
elements (shown with lighter lines, like description). Some elements, such as author-name ,
can be repeated, allowing many authors to be associated with a single topic. The XML schema
elements that have a suffix of code use enumerated values to specify the possible element
values. Data types such as decimal can also be specified with each element.
All Schematron rules are expressed using XPath expressions. This means you can use
simple path statements to select two parts of a document and do a comparison. Since
native XML databases index each element specified by a path, only part of the docu-
ment needs to be moved into RAM when running a rules check. Schematron rules can
also be configured to perform date checks and run web service validations. Schema-
tron is both simple and powerful. Many users say it's one of the most underutilized
features in the XML family of products.
Together, XML Schema and Schematron provide powerful and easy-to-use tools to
design XML documents and validate their structures. Graphical tools and simple path
Search WWH ::




Custom Search