- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
17 Apr 2002.ppt
XML Syntax: DTDs Andy Clark Validation of XML Documents XML documents must be well-formed XML documents may be valid Validation verifies that the structure and content of the document follows rules specified by grammar Types of grammars Document Type Definition (DTD) XML Schema (XSD) Relax NG (RNG) What is a DTD? Document Type Definition Defined in the XML 1.0 specification Allows user to create new document grammars A subset borrowed from SGML Uses non-XML syntax! Document-centric Focus on document structure Lack of “normal” datatypes (e.g. int, float) Document Structure Element declaration Element name Content model Attribute list declaration Element name Attribute name Value type Default value Element Declaration Content models ANY EMPTY Children Nestable groups of sequences and/or choices Occurrences for individual elements and groups Mixed content Intermixed elements and parsed character data Children Content Model Sequences Order required e.g. (foo,bar,baz) Choices Any one from list e.g. (foo|bar|baz) Nested sequences and choices e.g. (foo,bar,(baz|mumble)) e.g. (foo|(bar,baz)) Children Occurrences Specify occurrence count for… Individual elements Groups of sequences and choices Occurrences Exactly one e.g. foo (foo,bar) Zero or one e.g. foo? (foo,bar)? Zero or more e.g. foo* (foo|bar)* One or more e.g. foo+ (foo|bar)+ Attribute List Declaration Value types CDATA ENTITY, ENTITIES ID, IDREF, IDREFS NMTOKEN, NMTOKENS NOTATION Enumeration of values e.g. (true|false) Default value #IMPLIED, #REQUIRED, #FIXED Default value if not specified in document Example DTD (1 of 6) Text declaration Example DTD (2 of 6) Element declarations Example DTD (3 of 6) Element content models Example DTD (4 of 6) Attribute list declarations Example DTD (5 of 6) Attribute value type Example DTD (6 of 6) Attribute default value Macro Substitution Using Entities What are entities? Document pieces, or “storage units” Simplify writing of documents and DTD grammars Modular
您可能关注的文档
最近下载
- 《懂得爱:在亲密关系中成长》读书笔记.docx VIP
- 上海市中考语文专题复习:文言文虚词简表.pdf VIP
- 广西盐业公司的招聘试卷.pdf VIP
- 2025《民营经济促进法》解读课件PPT.pptx
- Haier海尔空调KFRd-120LW 7YAF81 KFRd-120LW 5YAF82 KFR-12ity 5YAF82用户手册.pdf
- 雪铁龙维修 手册 图DS_5LS_Owner_Book_ZH.pdf VIP
- 烟风煤支吊架设计手册-新版.pdf VIP
- 长期卧床鼻饲患者的护理ppt.pptx VIP
- 教学能力大赛教案--智慧工厂的安全策略之VLAN的划分.docx VIP
- GB 6246-2011 消防水带标准规范‘’.pdf
文档评论(0)