Created
November 25, 2016 23:07
-
-
Save witoong623/9ea3ab4f30e56d9df159c02dfa1b78d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!ELEMENT students (student+)> | |
<!ELEMENT student (firstname,middlename?,lastname,email)> | |
<!ELEMENT firstname (#PCDATA)> | |
<!ELEMENT middlename (#PCDATA)> | |
<!ELEMENT lastname (#PCDATA)> | |
<!ELEMENT email (#PCDATA)> | |
<!ATTLIST student id CDATA #REQUIRED> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE students SYSTEM "dtd_for_student.dtd"> | |
<students> | |
<student id="001"> | |
<firstname>สมชาย</firstname> | |
<lastname>ใจดี</lastname> | |
<email>somchai.j@hotmail.com</email> | |
</student> | |
<student id="002"> | |
<firstname>สมศรี</firstname> | |
<middlename>มาเรีย</middlename> | |
<lastname>ใจบุญ</lastname> | |
<email>somsri.j@gmail.com</email> | |
</student> | |
</students> | |
<!-- ให้ทำไฟล์ | |
dtd แบบ internal และ external (stdtd.dtd) | |
schema แบบ internal และ external (stxsd.xsd) | |
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE students [ | |
<!ELEMENT students (student+)> | |
<!ELEMENT student (firstname,middlename?,lastname,email)> | |
<!ELEMENT firstname (#PCDATA)> | |
<!ELEMENT middlename (#PCDATA)> | |
<!ELEMENT lastname (#PCDATA)> | |
<!ELEMENT email (#PCDATA)> | |
<!ATTLIST student id CDATA #REQUIRED> | |
]> | |
<students> | |
<student id="001"> | |
<firstname>สมชาย</firstname> | |
<lastname>ใจดี</lastname> | |
<email>somchai.j@hotmail.com</email> | |
</student> | |
<student id="002"> | |
<firstname>สมศรี</firstname> | |
<middlename>มาเรีย</middlename> | |
<lastname>ใจบุญ</lastname> | |
<email>somsri.j@gmail.com</email> | |
</student> | |
</students> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<students | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="xsd_for_students.xsd"> | |
<student id="001"> | |
<firstname>สมชาย</firstname> | |
<lastname>ใจดี</lastname> | |
<email>somchai.j@hotmail.com</email> | |
</student> | |
<student id="002"> | |
<firstname>สมศรี</firstname> | |
<middlename>มาเรีย</middlename> | |
<lastname>ใจบุญ</lastname> | |
<email>somsri.j@gmail.com</email> | |
</student> | |
</students> | |
<!-- ให้ทำไฟล์ | |
dtd แบบ internal และ external (stdtd.dtd) | |
schema แบบ internal และ external (stxsd.xsd) | |
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
elementFormDefault="qualified"> | |
<xs:attribute name="id" type="xs:string" /> | |
<xs:element name="student"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element name="firstname" type="xs:string" /> | |
<xs:element name="middlename" type="xs:string" minOccurs="0" /> | |
<xs:element name="lastname" type="xs:string" /> | |
<xs:element name="email" type="xs:string" /> | |
</xs:sequence> | |
<xs:attribute ref="id" use="required"/> | |
</xs:complexType> | |
</xs:element> | |
<xs:element name="students"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element ref="student" maxOccurs="unbounded" /> | |
</xs:sequence> | |
</xs:complexType> | |
</xs:element> | |
</xs:schema> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment