<!DOCTYPE address-book [ <!ELEMENT address-book (entry+) ... ]> <address-book> ... </address-book> |
<!DOCTYPE name SYSTEM "name.dtd"> <!DOCTYPE name SYSTEM "file:///C:/samples/name.dtd"> <!DOCTYPE name SYSTEM "http://mm.sm.ac.kr/lec/name.dtd"> |
<!DOCTYPE name
PUBLIC "-//Wrox Press//DTD Name//EN"> <!DOCTYPE name PUBLIC "-//Wrox Press//DTD Name//EN" "name.dtd" > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/ svg10.dtd"> |
<!DOCTYPE address-book SYSTEM "ex03-03.dtd"
[ <!ELEMENT memo ANY> ]> |
<!ELEMENT address-book (entry+)> <!ELEMENT entry (name, pic?, address, tel*, fax*, email*)> <!ELEMENT name (#PCDATA | fname | lname)*> |
<!ELEMENT address (postal-code?, region, city?, gu?, dong, street)> <!ELEMENT postal-code (#PCDATA)> |
<!ELEMENT br EMPTY>
|
<br /> |
<!ELEMENT name (#PCDATA) > |
<name>È«±æµ¿</name>
|
<!ELEMENT name (nickname |( fname, lname))> ... <!ELEMENT address (region, (city | gu), dong)> ... |
<name>
<nickname>¼öÆÛ¸Ç</nickname> </name> <name> <fname>±æµ¿</fname> <lname>È«</lname> </name> ... <address> <region>¼¿ï½Ã</region> <gu>¿ë»ê±¸</gu> <dong>ûÆĵ¿2°¡</dong> </address> <address> <region>ÃæûºÏµµ</region> <city>ÃæÁÖ½Ã</city> <dong>±³Çöµ¿</dong> </address> |
<!ELEMENT address-book
(entry+)> <!ELEMENT entry (name, pic?, address, tel*, fax*, email*)> |
<!ELEMENT name
(#PCDATA)> <!ELEMENT name (#PCDATA |( fname, lname))> |
<name> È«±æµ¿
</name> <name> <fname>±æµ¿</fname> <lname>È«</lname> </name> |
<!ELEMENT
name (#PCDATA | fname | lname)*> |
<name>±æµ¿<lname>È«</lname></name> <name><fname>±æµ¿</fname>È«</name> <name> ¿ì¸®ÀÇ ¼öÆÛ¸Ç <fname>±æµ¿</fname> <lname>È«</lname> </name> |
<!ELEMENT p (#PCDATA | b | i )*> |
<p><i>¿ì¸®ÀÇ <b>¼öÆÛ¸Ç</b></i> ÀÚ¶û½º·± <b>È«±æµ¿</b> ¸¸¼¼ !!!</p> |
<!ELEMENT bold ANY> |
<bold> <name>È«±æµ¿</name>
</bold> |
<!ELEMENT cover ((title, author) | (title,
subtitle)) >
... <cover><title>aa</title><author>bb</author></cover> ************ ¾î´ÀÂÊ¿¡ ÇØ´ç? |
¼öÁ¤ : <!ELEMENT cover (title, (author | subtitle)) > |
<!ATTLIST ¿ä¼Ò¸í ¼Ó¼º¸í ¼Ó¼ºÀ¯Çü ±âº»°ª¼±¾ð>
( ¼Ó¼º¸®½ºÆ® )
<ATTLIST tel preferred (true|false) "false"> <!ELEMENT name (fname, lname))> <!ATTLIST name nickname CDATA #REQUIRED> |
<tel
preferred="true">02-710-9424</tel> <tel>043-854-9919</tel> ... <name nickname="¼öÆÛ¸Ç"> <fname>±æµ¿</fname> <lname>È«</lname> </name> |
¹®ÀÚ¿ À¯Çü |
CDATA | ÅؽºÆ® ¹®ÀÚ¿ (½ºÆ®¸µ) |
ÅäÅ«ÈµÈ À¯Çü |
ID | ÇØ´ç ¿ä¼Ò¸¦ À§ÇÑ °íÀ¯ À̸§, XML À̸§ ±ÔÄ¢ Áؼö |
IDREF | ¼±¾ðµÈ ID°ªÀ» °®°í ÀÖ´Â ¿ä¼Ò¿¡ ´ëÇÑ ÂüÁ¶(¸µÅ©) | |
IDREFS | °ø¹éÀ¸·Î ±¸º°µÇ´Â IDREFÀÇ ¸ñ·Ï | |
ENTITY | ¹Ì¸® Á¤ÀÇµÈ ¿ÜºÎ ¿£Æ¼Æ¼ À̸§À» ÂüÁ¶ | |
ENTITIES | °ø¹éÀ¸·Î ±¸º°µÇ´Â ¿£Æ¼Æ¼ÀÇ ¸ñ·Ï | |
NMTOKEN | ÇϳªÀÇ À̸§ ÅäÅ« (°ø¹éÀÌ ¾ø´Â ´Ü¾î) | |
NMTOKENS | °ø¹éÀ¸·Î ±¸º°µÇ´Â NMTOKENÀÇ ¸ñ·Ï | |
¿°ÅÇü À¯Çü |
¿°ÅÇü ¸®½ºÆ® | ´ÝÇôÁø ¸ñ·Ï, |·Î ±¸º°µÇ´Â °ª Áß¿¡ Çϳª »ç¿ë |
±âŸ |
NOTATION | ¸í½ÃÀûÀ¸·Î ¼±¾ðµÈ NOTATION type »ç¿ë |
<!ATTLIST doc version CDATA "1.00"
> |
default ¼Ó¼º°ª ÁöÁ¤ version="1.00" version="1.00" (Æļ°¡ Á¦°ø) version="2.00" |
<!ATTLIST doc version CDATA
#REQUIRED > |
»ç¿ëÀÚ ÁöÁ¤ (Çʼö) version="1.00" * À¯È¿¼º °ËÁõ ¿À·ù version="2.00" |
<!ATTLIST doc version CDATA
#IMPLIED > |
»ç¿ëÀÚ ÁöÁ¤ version="1.00" version=?? (ÀÀ¿ë SW¿¡¼ °áÁ¤) version="2.00" |
<!ATTLIST doc version CDATA
#FIXED "1.00"
> |
°íÁ¤°ª »ç¿ë version="1.00" version="1.00" (Æļ°¡ Á¦°ø) * À¯È¿¼º °ËÁõ ¿À·ù |
<!ELEMENT list
(name*)> |
<list> |
<!ELEMENT ºÐ·ù (#PCDATA)> |
<ºÐ·ù
group_id="c03">ÈÀåÇ°</ºÐ·ù> <ºÐ·ù group_id="e07">ÀüÀÚÁ¦Ç°</ºÐ·ù> <ºÐ·ù group_id="d05">½Å¹ß</ºÐ·ù> <ºÐ·ù>ÀÇ·ù</ºÐ·ù> |
<!ELEMENT person (name, email*, addr?)
> <!ATTLIST person perID ID #REQUIRED > |
<person perID="sblim" >
<name> ÀÓ¼ø¹ü</name> </person> <person perID="hong01" > <name> È«±æµ¿ </name> </person> |
<!ATTLIST ºÐ·ù group_id ID #IMPLIED |
<ºÐ·ù
group_id="c03">ÈÀåÇ°</ºÐ·ù> <ºÐ·ù group_id="c03">°¡ÀüÁ¦Ç°</ºÐ·ù> <ºÐ·ù group_id="105">½Å¹ß</ºÐ·ù> |
<!ATTLIST person perID ID #FIXED > |
<person perID="sb%1" > <name> ÀÓ¼ø¹ü</name> </person> |
... |
<ºÐ·ù
group_id="c03">ÈÀåÇ°</ºÐ·ù> <ºÐ·ù group_id="e07">ÀüÀÚÁ¦Ç°</ºÐ·ù> <ºÐ·ù group_id="d05">½Å¹ß</ºÐ·ù> ... <Á¦Ç°¸í ±¸ºÐ="c03">½ºÅ²</Á¦Ç°¸í> <Á¦Ç°¸í ±¸ºÐ="e07">µðÁöÅÐ Ä«¸Þ¶ó</Á¦Ç°¸í> <Á¦Ç°¸í ±¸ºÐ="d05">¿îµ¿È</Á¦Ç°¸í> <Á¦Ç°¸í ±¸ºÐ="e07">ÇÁ¸°ÅÍ</Á¦Ç°¸í> |
... |
<person perID="sblim" > <name> ÀÓ¼ø¹ü
... <person perID="hong01" > <name> È«±æµ¿ ... ... <book> <title author="sblim">XML Ŭ·¡½º</title> <pages>458</pages> </book> <book> <title authors="hong01 sblim">XML Bible </title> <pages>652</pages> </book> |
<!ENTITY myPhoto SYSTEM
"file:///C:/images/photo01.gif" NDATA gif > |
<!ELEMENT name
(#PCDATA)> |
<name º°¸í="¼öÆÛ¸Ç" ¾ÆÈ£="À屺">È«±æµ¿</name> |
<!ELEMENT title
(#PCDATA)> |
<title pic="c://book.gif">XML
Bible</title> |
<!ATTLIST name
honor |
<name honor="Mr. Dr. Grand">È«±æµ¿</name> |
<!NOTATION bmp SYSTEM
"file:///C:/windows/paint.exe"> |
<?xml version="1.0"
encoding="EUC-KR"?> <!DOCTYPE memo [ <!ENTITY hong "È«±æµ¿, ¼÷¸í¿©´ë"> <!ENTITY sblim "<entry> <name>ÀÓ¼ø¹ü</name> <tel>02-710-9424</tel> <email href='sblim@sookmyung.ac.kr'/> </entry>"> ]> <memo> <header> <to> To: &hong; </to> <from> From: &sblim; </from> </header> <body>ȸÀÇ°¡ ÀÖÀ¸´Ï ²À Âü¼®ÇϽñ⠹ٶø´Ï´Ù. </body> </memo> |
´Ù¸¥ ¿ä¼Ò¸¦ Æ÷ÇÔÇÏ´Â ¿£Æ¼Æ¼ÀÇ °æ¿ì * ÇÑ ÂÊ ¿ä¼Ò¸¸ Æ÷ÇÔÇÏÁö ¸»°í ½ÃÀÛ/³¡ ¾çÂÊ ¸ðµÎ Æ÷ÇÔ * Àç±ÍÀû(recursive) ÂüÁ¶°¡ ¾ÈµÇµµ·Ï ÁÖÀÇ ... <to> To: È«±æµ¿, ¼÷¸í¿©´ë </to> <from> From: <entry> <name>ÀÓ¼ø¹ü</name> <tel>02-710-9424</tel> <email href='sblim@sookmyung.ac.kr'/> </entry> </from> ... |
filename : hong.ent
|
filename : sblim.ent
|
<?xml version="1.0"
encoding="EUC-KR"?> <!DOCTYPE address-book SYSTEM "address-book.dtd" [ <!ENTITY hong SYSTEM "hong.ent"> <!ENTITY sblim SYSTEM "sblim.ent"> ]> <address-book> &hong; &sblim; </address-book> |
<address-book> <entry> <name>È«±æµ¿</name> <tel>02-710-9379</tel> </entry> <entry> <name>ÀÓ¼ø¹ü</name> <tel>02-710-9424</tel> </entry> </address-book> |
<!ENTITY % bool '(true | false)
"false" '> <!ELEMENT address-book (entry+)> <!ELEMENT entry (name, address, tel*, email*)> ... <!ELEMENT tel (#PCDATA)> <!ATTLIST tel preferred %bool;> <!ELEMENT email EMPTY> <!ATTLIST email CDATA #REQUIRED preferred %bool;> |
<!ENTITY % prefer 'preferred (true | false) "false"
'> ... <!ELEMENT tel (#PCDATA)> <!ATTLIST tel %prefer;> <!ELEMENT email EMPTY> <!ATTLIST email CDATA #REQUIRED %prefer;> |
<?xml version="1.0"
encoding="EUC-KR"?> <!DOCTYPE address-book [ <!ELEMENT address-book (entry+)> <!ELEMENT entry (name, address, tel*)> <!ELEMENT name (#PCDATA)> <!ENTITY % addr SYSTEM "address.dtd"> %addr; <!ELEMENT tel (#PCDATA)> <!ATTLIST tel preferred (true | false) "false"> ]> |
filename : address.dtd
|
<?xml version="1.0"
encoding="EUC-KR"?> <!DOCTYPE memo [ <!ELEMENT memo (payment+)> <!ELEMENT payment (#PCDATA)> <!ENTITY % s-name SYSTEM "initial.ent"> %s-name; ]> <memo> <payment> &GD; ¢75, &YY; ¥ 8000, &SB; £5</payment> </memo> |
filename : initial.ent
|
** ¿£Æ¼Æ¼·Î ¹®¼ °ü¸® => ±Ô¸ð°¡ Å« DTD¿Í ¹®¼ ÁýÇÕÀ» ¸ðµâÈ & °ü¸®
<!ENTITY myPhoto SYSTEM "http:/mm.../images/photo01.gif" NDATA
gif
> |
<!NOTATION GIF89a PUBLIC "-//CompuServe//NOTATION Graphics Interchange Format 89a//EN" "C:\windows\kodakprv.exe"> <!NOTATION jpg PUBLIC "+//ISBN 0-7923-9432-1::Graphic Notation//NOTATION JPG Graphic Interchange Format//EN"> |
||
<!NOTATION GIF89a SYSTEM "GIF"> <!-- MiME Çü½Ä --> <!NOTATION GIF89a SYSTEM "image/gif"> <!NOTATION jpeg SYSTEM "JPG"> | ||
<!NOTATION bmp SYSTEM "file:///c:/windows/paint.exe"> <!-- Á÷Á¢ Ç¥±â
--> <!NOTATION memo SYSTEM "file:///c:/windows/notepad.exe"> |