***mail.dtd***
<?xml version=``1.0`` encoding=``EUC-KR``?> <!ELEMENT mail (from, to)> <!-- ¿ÜºÎ Parameter Parsed Entity --> ///¿ÜºÎ¿¡ °Í °¡Á®´Ù°¡ »ç¿ëÇÔ <!ENTITY % fromto SYSTEM ``mail1.dtd``>
%fromto; <!ATTLIST from pic ENTITY #REQUIRED> <!-- ³»ºÎ Parameter Parsed Entity --> <!ENTITY % EMAIL ``email CDATA #REQUIRED``> <!ATTLIST from %EMAIL;> <!ATTLIST to %EMAIL;>
<!-- ³»ºÎ General Parsed Entity --> <!ENTITY name ``asdfasdfadsfasdfasdfasdfasdf``> <!-- ¿ÜºÎ General Parsed Entity --> <!ENTITY name SYSTEM ``mail.txt``> <!-- ¿ÜºÎ UnParsed Entity --> <!ENTITY img SYSTEM ``ny.jpg`` NDATA image> <!NOTATION image SYSTEM ``view.exe``>
***mail1.dtd***
<?xml version=``1.0`` encoding=``EUC-KR``?> <!ELEMENT from (#PCDATA)> <!ELEMENT to (#PCDATA)>
-------------------------------------------
DTD
-È®ÀåÇÒ¼ö¾ø´Ù.
-XML°ú ´Ù¸£´Ù.
-DOMÀ» Áö¿øÇÏÁö ¸øÇÑ´Ù.
Schema
-DTDº¸´Ù ±¤¹üÀ§ÇÔ
-¸ðµçµ¥ÀÌÅÍÀÌ¿ë
-±¸Á¶:¿ä¼Ò¿Í ¹®¼Å¸ÀÔ
-µ¥ÀÌÅÍ Å¸ÀÔ:ÆÄ»ýµÈ ŸÀÔ
-Á¤À§¸¦ À§ÇÑ ¸¶Å©¾÷
-¼±¾ðÀ» À§ÇÑ ¸¶Å©¾÷
*SchemaÀÇ Á¤ÀÇ
Schema¹®¼(xsd)
*NameSpace
¿¹Á¦
***schematest.xml***
<?xml version=``1.0`` encoding=``EUC-KR``?>
<root xmlns:xsi=``http://www.w3.org/2001/XMLSchema-instance`` xsi:noNamespaceSchemaLocation=``test.xsd``> ¾È³çaafsadfsd </root>
***test.xsd***
<?xml version=``1.0`` encoding=``EUC-KR``?> <xs:schema xmlns:xs=``http://www.w3.org/2001/XMLSchema``> <xs:element name=``root``> <xs:simpleType> <xs:restriction base=``xs:integer``> <xs:minInclusive value=``0``/> <xs:maxExclusive value=``100``/> </xs:restriction> </xs:simpleType> </xs:element> </xs:schema>
XML ½ºÅ͵ð 2005 01 12
|