XML Schema ±âÃÊ*** Schema¿¡´Â ENTITY ±â´ÉÀÌ ¾ø´Ù => DTD°¡ °è¼Ó »ç¿ëµÉ ÀÌÀ¯...
¿¹Á¦) name5.xsd
<?xml version="1.0" encoding="EUC-KR"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://mm.sookmyung.ac.kr/names" xmlns:target="http://mm.sookmyung.ac.kr/names" elementFormDefault="qualified"> <element name="¼º¸í"> <complexType> <sequence> <element name="À̸§" type="string"/> <element name="º°¸í" type="string"/> <element name="¼º" type="string"/> </sequence> <attribute name="ȣĪ" type="string"/> </complexType> </element> </schema> |
<?xml version="1.0" encoding="EUC-KR"?> <¼º¸í ȣĪ="Mr." xmlns="http://mm.sookmyung.ac.kr/names" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mm.sookmyung.ac.kr/names name1.xsd" > <À̸§>±æµ¿</À̸§> <º°¸í>À屺</º°¸í> <¼º>È«</¼º> </¼º¸í> |
<schema xmlns="URI"
targetNamespace="URI"
elementFormDefault="qualified ¶Ç´Â unqualified"
attributeFormDefault="qualified ¶Ç´Â unqualified"
version="¹öÀü¹øÈ£">
<¼º¸í xmlns="http://sm.ac.kr/names"> <À̸§>±æµ¿</À̸§> <º°¸í>À屺</º°¸í> <¼º>È«</¼º> </¼º¸í> |
<sm:¼º¸í xmlns:sm="http://sm.ac.kr/names"> <sm:À̸§>±æµ¿</sm:À̸§> <sm:º°¸í>À屺</sm:º°¸í> <sm:¼º>È«</sm:¼º> </sm:¼º¸í> |
<sm:¼º¸í xmlns:sm="http://sm.ac.kr/names"> <À̸§>±æµ¿</À̸§> <º°¸í>À屺</º°¸í> <¼º>È«</¼º> </sm:¼º¸í> |
* ÇÊ¿äÇÑ °æ¿ì¿¡¸¸ »ç¿ë - XSLT, SOAPµî ´Ù¸¥ Ç¥ÁØ°ú °°ÀÌ »ç¿ë * ¹Ýµå½Ã qualified µÇ¾î¾ß ÇÏ´Â °æ¿ì - Àü¿ª(global) ¼±¾ð½Ã |
<element name="¿ä¼Ò À̸§" type="(Àü¿ª)¿ä¼Ò Çü½Ä"
ref="Àü¿ª¿ä¼Ò ÂüÁ¶" form="qualified ¶Ç´Â unqualified"
minOccurs="À½¾Æ´Ñ Á¤¼ö" maxOccurs="À½¾Æ´Ñ Á¤¼ö | unbound"
default="±âº» °ª" fixed="°íÁ¤ °ª">
<element name="¼º¸í"> <complexType> ... Çü½Ä Á¤º¸ ... </complexType> </element> |
<element name="¼º¸í"> <simpleType> ... Çü½Ä Á¤º¸ ... </simpleType> </element> |
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://mm.sm.ac.kr/names" xmlns:mm="http://mm.sm.ac.kr/names" elementFormDefault="qualified"> <complexType name="À̸§Á¤ÀÇ"> <sequence> <element name="À̸§" type="string"/> <element name="º°¸í" type="string"/> <element name="¼º" type="string"/> </sequence> <attribute name="ȣĪ" type="string"/> </complexType> <element name="¼º¸í" type="mm:À̸§Á¤ÀÇ"/> </schema> |
mm: Ÿ°Ù À̸§°ø°£ Àü¿ªÇü½Ä(type) ¼±¾ð => Àç»ç¿ë °¡´É Àü¿ªÇü½Ä »ç¿ë - string => Schema¿¡¼ ¼±¾ð Àü¿ªÇü½Ä »ç¿ë - mm:À̸§Á¤ÀÇ => mm ¹®¼ ³»¿¡¼ ¼±¾ð |
<schema ... xmlns:mm="http://mm.sm.ac.kr/names" ... > <element name="À̸§" type="string"/> <element name="º°¸í" type="string"/> <element name="¼º" type="string"/> <complexType name="À̸§Á¤ÀÇ"> <sequence> <element ref="mm:À̸§" /> <element ref="mm:º°¸í" /> <element ref="mm:¼º" /> </sequence> <attribute name="ȣĪ" type="string"/> </complexType> <element name="¼º¸í" type="mm:À̸§Á¤ÀÇ"/> </schema> |
mm: Ÿ°Ù À̸§°ø°£ Àü¿ª¿ä¼Ò ¼±¾ð - mm:À̸§, mm:º°¸í, mm:¼º Àü¿ªÇü½Ä(type) ¼±¾ð - mm:À̸§Á¤ÀÇ Àü¿ª¿ä¼Ò »ç¿ë => mm ¹®¼ ³»¿¡¼ ¼±¾ð Àü¿ªÇü½Ä »ç¿ë - mm:À̸§Á¤ÀÇ => mm ¹®¼ ³»¿¡¼ ¼±¾ð |
<element name="º°¸í1"
type="string" minOccurs="2" maxOccurs="2"> <element ref="mm:º°¸í2" maxOccurs="10"> <!-- overriding --> <element name="º°¸í3" type="string" minOccurs="0" maxOccurs="unbound"> |
<schema ...> <complexType name="À̸§Á¤ÀÇ"> <sequence> <element name="À̸§" type="string"/> <element name="º°¸í" type="string"/> <element name="¼º" type="string"/> <any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbound" </sequence> <attribute name="ȣĪ" type="string"/> </complexType> <element name="¼º¸í" type="mm:À̸§Á¤ÀÇ"/> </schema> |
<¼º¸í ȣĪ="Mr." xmlns="http://sm.ac.kr/names"> <À̸§>±æµ¿</À̸§> <º°¸í>À屺</º°¸í> <¼º>È«</¼º> <p>...Àι° ¼³¸í...</p> <º°¸í>µµ±úºñ</º°¸í> <¼º¸í>È«µÎ±ú</¼º¸í> </¼º¸í> |
<schema ... xmlns:mm="http://mm.sm.ac.kr/names" ... > <group name="À̸§±×·ì"> <sequence> <element name="À̸§" type="string"/> <element name="º°¸í" type="string"/> <element name="¼º" type="string"/> </sequence> </group> <element name="¼º¸í" > <complexType> <group ref="mm:À̸§±×·ì" /> <attribute name="ȣĪ" type="string"/> </complexType> </element> </schema> |
mm: Ÿ°Ù À̸§°ø°£ Àü¿ª ±×·ì ¼±¾ð - mm:À̸§±×·ì Àü¿ª±×·ì »ç¿ë => mm ¹®¼ ³»¿¡¼ ¼±¾ð |
<element name="p" > <complexType mixed="true"> <choice minOccurs="0" maxOccurs="unbound"> <element name="b" type="string"> <element name="i" type="string"> </choice> </complexType> </element> <element name="emptyE" > <complexType> </complexType> </element> |
<p>³»ÀÏ <b>¿ÀÀü</b>¿¡ Áß¿äÇÑ <b>ȸÀÇ</b>°¡ ÀÖÀ¸´Ï, <i>¹Ýµå½Ã</i> Âü¼®ÇϽñ⠹ٶø´Ï´Ù.</p> <emptyE/> |
<element name="¼º¸í"> <complexType> <all> <element name="À̸§" type="string"/> <element name="º°¸í" type="string"/> <element name="¼º" type="string"/> </all> <attribute name="ȣĪ" type="string"/> </complexType> </element> |
<¼º¸í> <À̸§>±æµ¿</À̸§> <º°¸í>À屺</º°¸í> <¼º>È«</¼º> </¼º¸í> <¼º¸í> <º°¸í>À屺</º°¸í> <¼º>È«</¼º> <À̸§>±æµ¿</À̸§> </¼º¸í> |
<attribute name="¼Ó¼º À̸§" type="Àü¿ª Çü½Ä"
ref="Àü¿ª¼Ó¼º ÂüÁ¶" form="qualified ¶Ç´Â unqualified"
use="optional | prohibited | required"
default="±âº» °ª" fixed="°íÁ¤ °ª">
<element name="¼º¸í"> <complexType> <sequence> <element name="À̸§" type="string"/> <element name="º°¸í" type="string"/> <element name="¼º" type="string"/> </sequence> <anyAttribute namespace="##local http://www.w3.org/XML/1998/namespace" processContents="lax" /> </complexType> </element> |
<¼º¸í ȣĪ="Mr."> <À̸§>±æµ¿</À̸§> <º°¸í>À屺</º°¸í> <¼º>È«</¼º> </¼º¸í> ------------------- <¼º¸í Á÷Ã¥="´ëÀå"> <À̸§>±æµ¿</À̸§> <º°¸í>À屺</º°¸í> <¼º>È«</¼º> </¼º¸í> |
<simpleType name="À̸§" final="...">
<attribute
name="ȣĪ"/> <simpleType> <restriction base="string"> <enumeration value="Mr."/> <enumeration value="Ms."/> <enumeration value="Miss"/> <enumeration value="Dr."/> </restriction> </simpleType> </attribute> |
<element
name="ºÐ"/> <simpleType> <restriction base="nonNegativeInteger"> <maxExclusive value="60"/> </restriction> </simpleType> </element> |
<element
name="¹øÈ£"/> <simpleType> <list itemType="nonNegativeInteger"/> </simpleType> </element> |
<element
name="¼º¾¾"/> <simpleType> <list itemType="string"/> </simpleType> </element> |
<simpleType
name="Nations"> <restriction base="string"> <enumeration value="Korea"/> <enumeration value="Japan"/> <enumeration value="USA"/> <enumeration value="France"/> </restriction> </simpleType> <simpleType name="±¹°¡¸í"> <restriction base="string"> <enumeration value="´ëÇѹα¹"/> <enumeration value="ÀϺ»"/> <enumeration value="¹Ì±¹"/> <enumeration value="ºê¶óÁú"/> </restriction> </simpleType> |
<element
name="³ª¶ó"/> <simpleType> <union membertype="mm:Nations mm:±¹°¡¸í"/> </simpleType> </element> --------------- <³ª¶ó>Korea</³ª¶ó> <³ª¶ó>´ëÇѹα¹</³ª¶ó> <³ª¶ó>France</³ª¶ó> <³ª¶ó>ºê¶óÁú</³ª¶ó> <³ª¶ó>Korea ´ëÇѹα¹</³ª¶ó> : X |