DTD vs' XML Schema - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

DTD vs' XML Schema

Description:

Form is XML based. Why Use XML Schema? To specify data types for data content ... Glance through the Glossary for a more complete list of XML terms ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 12
Provided by: danrsc
Category:
Tags: dtd | xml | schema | xmlbased

less

Transcript and Presenter's Notes

Title: DTD vs' XML Schema


1
DTD vs. XML Schema
  • What is a DTD?
  • Stands for Document Type Definition
  • A DTD instance is a schema that describes the
    vocabulary and structures of XML files that
    conform to it
  • Part of XML V1.0 Spec.

2
Why Are Schemas Valuable?
  • Provide standard structures for data exchange
  • Provide constraints for testing document validity

3
Why Are Schemas Valuable?
  • Help manage integration of documents and data
  • Framework for both document and data structures
  • Help separate parts of documents for intelligent
    search/manipulation

4
What DTDs Dont Do Well
  • Allow for the detailed specification of data
    types for data content
  • Verify that data conforms to data type rules

5
What is XML Schema?
  • Proposed new XML schema specification mechanism
    from the W3C
  • Form is XML based

6
Why Use XML Schema?
  • To specify data types for data content
  • To verify that an XML documents data content
    conforms to its defined data types

7
DTD vs. XML Schema Ex. 1
DTD lt!ELEMENT MeasurementDetails (primaryIndex,
startIndex, endIndex, (evenSampling
unevenSampling), indexUnits, uomNamingSystem,
comment?)gt
XML Schema ltelementType name
"MeasurementDetails"gt ltsequencegt
ltelementTypeRef name "primaryIndex"/gt
ltelementTypeRef name "startIndex"/gt
ltelementTypeRef name "endIndex"/gt
ltchoicegt ltelementTypeRef name
"evenSampling"/gt
ltelementTypeRef name "unevenSampling"/gt
lt/choicegt ltelementTypeRef name
"indexUnits"/gt ltelementTypeRef name
"uomNamingSystem"/gt ltelementTypeRef name
"comment" minOccur "0" maxOccur "1"/gt
lt/sequencegt lt/elementTypegt
8
DTD vs. XML Schema Ex. 2
DTD lt!ELEMENT wellName (PCDATA)gt lt!ATTLIST
wellName type (API10 API12 API14
CPA WWN IRIS21 NPD DTI
LOCALFIELD SHORTNAME
PROJECTNAME UNKNOWN OTHER)
REQUIREDgt
XML Schema ltelementType name "wellName"gt
ltdatatypeRef name "string"/gt ltattrDecl name
"type" required "true"gt ltdatatypeRef
name "ENUMERATION"gt ltenumerationgt
ltliteralgtAPI10lt/literalgt
ltliteralgtAPI12lt/literalgt
ltliteralgtAPI14lt/literalgt
ltliteralgtCPAlt/literalgt ...
lt/enumerationgt lt/datatypeRefgt
lt/attrDeclgt lt/elementTypegt
9
Why Continue to Use DTDs?
  • XML Schema is only in draft form today

10
How Can We Promote Standard Schemas?
  • Register schemas with XML standards organizations
  • XML.ORG (http//www.xml.org)
  • Accepts DTD definitions
  • BizTalk (http//www.biztalk.org)
  • Accepts XML Schema definitions
  • POSC plans to register WellLogML with both
    organizations

11
Where Can I Get More Information?
  • http//www.posc.org/ebiz
  • Check out the XML Resources and Organizations
    links
  • Glance through the Glossary for a more complete
    list of XML terms
Write a Comment
User Comments (0)
About PowerShow.com