DTD and Shema Learning

Source: Internet
Author: User
Tags cdata

* Write a document to restrict the current XML document
Classification
* DTD
* Document Association
* Internal Association
* Format: <! DOCTYPE root element [syntax]>
* External Association
* Format: <! DOCTYPE root element SYSTEM "URI" >
* Public Association
* Format: <! DOCTYPE root element Public "document name" "Document URL" >
* Element
* Format: <! ELEMENT name constraint >(Example <! ELEMENT Shiporder (orderperson,shipto,item+) >)
Symbol
? : 0 1
+: >=1
*: >=0
(): Group
| : Select
,: Order
Type
#PCDATA, can only write characters, cannot contain child elements,Note: (#PCDATA) (Example <! ELEMENT name (#PCDATA) >)
Empty, element content is null
and, element content arbitrary
Properties
* Format: <! attlist element name [property name attribute type constraint ...] >(Example <! Attlist Book
ID ID #REQUIRED
pId IDREF #IMPLIED
City CDATA #FIXED "Beijing"
Lang (en| cn| jp| TW) "CN" >)
                                                            
* Type
* CDATA, character
* (), select
* ID, set Unique identifier, note that must start with letter
* IDREF, referencing the ID value that exists again
* Constraint
* #REQUIRED, must fill in
* #IMPLIED, Optional
* #FIXED value, fixed value
* DefaultValue, default value
* Entity
* Internal Entity
* Referencing Entities
* Format: <! Entity entities name "Content" >
* Usage Location: used in XML document
* Use format:& entity name;
* Parametric entity
* Format: <! Entity% entities Name "content" >
* Usage location: used in DTD documents
* Use format:% entity name;
* External Entities
* Format: <! Entity entities name SYSTEM "URI" >
* Usage Location: used in XML document
* Use format:& entity name;

* Schema
* Extension: *.xsd
* Schema document is based on XML
* Schema document, root element is schema, defined in Http://www.w3.org/2001/XMLSchema


DTD and Shema Learning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.