|
Article Excerpt XML Schemas are quickly becoming the industry standard that Document Type Definitions (DTDs) used to be. Much has been written about the advantages of XML Schemas over DTDs. Indeed, Schemas do offer advantages. However, with all the focus on the need to transition from DTDs to Schemas, it seems that little attention has been paid to how XML Schemas and DTDs can be used together.
This article focuses on how to validate an XML document against an XML Schema and a DTD at the same time. Additionally, the article focuses on how to transition from using DTDs exclusively to using both XML Schemas and DTDs. This type of transition is especially important for organizations that have heavily invested in DTDs and now have large document inventories based on them. The XML Schema and DTD in this article will be a small version of the DocBook DTD standard--a modular approach to building DTDs that has long been a standard for SGML developers. Although the example is presented in a recognizable DocBook format, it could easily he adapted to work with XML Schemas and DTDs not based on the DocBook standard. The example could also be adapted to work in a developmental environment in which a "full-version" of DocBook might be used.
A first step to consider when moving to XML Schemas is whether to write the schema from scratch, generate it from an XML document, or convert it from an existing DTD. Of these options, the first is probably the least desirable, unless development time is not an issue, which is probably not the case. A good compromise to writing a schema from scratch is to generate it automatically from an existing XML document. To generate a schema from an XML document using XMLSPY, open the XML document, select "DTD/Schema," and then select the "Generate DTD/Schema" option.
If an XML document on which a schema can be based is not available, consider generating one from an existing text file....
|
|

Looking for additional articles?
Search our database of over 3 million articles.
Looking for more in-depth information on this industry?
Search our complete database of Industry & Market reports by text, subject, publication
name or publication date.
About Goliath
Whether you're looking for sales prospects, competitive information, company
analysis or best practices in managing your organization,
Goliath can help you meet your business needs.
Our extensive business information databases empower business
professionals with both the breadth and depth of credible,
authoritative information they need to support their business
goals. Whether it be strategic planning, sales prospecting,
company research or defining management best practices -
Goliath is your leading source for accurate information.
|
|