We have seen that namespaces and schemas written in XML provide us with
some powerful new tools for expression. They help us get over problems
associated with creating single document instances that relate to several
schemas. This ability means that we can extend existing schemas when
necessary or separate out large complex schemas into smaller more
manageable ones. At the same time, schemas in XML provide a number of other
benefits that address the shortcomings associated with DTDs.
RDF is quite powerful, though that very power may make it too complex
for everyday use. The W3C Schemas effort is bringing metadata into focus
for working XML programmers, but is not yet a standard. In the mean time,
until W3C XML Schemas are standardized XML-DR and its associated datatypes
give us an implementation that is close to XML Schemas in construction, and
allow us to roll up our sleeves and write some code immediately. While
XML-DR doesn't offer the full range of capabilities promised in XML
Schemas, we were able to make some improvements to our working example. In
particular, we have brought the following benefits to our Book Catalog
example:
Better organization and reuse of a complex domain through vocabulary
segmentation
Strong typing of data when converting it to and from XML
Retained the precision of the DTD (Schemas promise greater flexibility
in cardinality)
Expressed our problem in XML syntax, allowing us to use conventional XML
parsers to read and process our schemas
Metadata is moving from the exclusive province of the academic community
to the everyday toolbox of XML programmers. The rich research efforts in
metadata are giving birth to a focused, practical standard in the hands of
the W3C. Indeed, XML Schemas will do as much for programmers when they are
supported as the DOM did. The XML-DR support in MSXML hints at the
possibilities. Perhaps by the time you read this the W3C will have issued a
Schemas Recommendation.
©1999 Wrox Press Limited, US and
UK.