Extensible Markup Language (XML) 1.0±¾ÎĵµÊÇW3C½¨ÒéXML 1.0(1998Äê2ÔÂ10ÈÕ)µÄÖÐÎİ棬ÆäÖпÉÄÜÓдíÎóºÍ²»Í×Ö®´¦¡£ Ó¢ÎÄ°æÊÇΨһµÄÕýʽ°æ£¬Î»ÓÚ£º http://www.w3.org/TR/1998/REC-xml-19980210 ±¾ÎĵµÎ»ÓÚ£º http://lightning.prohosting.com/~qqiu/xml/trans/REC-xml-19980210-cn.html
Öø×÷ȨÉùÃ÷λÓÚ£ºhttp://www.w3.org/Consortium/Legal/copyright-documents.html Copyright © 1998 W3C (MIT£¬ INRIA£¬ Keio )£¬ All Rights Reserved. W3C liability£¬ trademark£¬ document use and software licensing rules apply. |
±¾ÎĵµÍêÕûµØÃèÊöÁË¿ÉÀ©Õ¹±ê¼ÇÓïÑÔ(Extensible Markup Language£¬XML)£¬ËüÊDZê׼ͨÓñê¼ÇÓïÑÔ(Standard Generic Markup Language£¬SGML)µÄÒ»¸ö×Ó¼¯¡£ÆäÄ¿µÄÔÚÓÚʹµÃÔÚWebÉÏÄÜÒÔÏÖÓг¬Îı¾±ê¼ÇÓïÑÔ(Hypertext Markup Language£¬HTML)µÄʹÓ÷½Ê½Ìṩ£¬½ÓÊպʹ¦ÀíͨÓõÄSGML³ÉΪ¿ÉÄÜ¡£XMLµÄÉè¼Æ¼È¿¼ÂÇÁËʵÏֵķ½±ãÐÔ£¬Í¬Ê±Ò²¹Ë¼°ÁËÓëSGMLºÍHTMLµÄ»¥²Ù×÷ÐÔ¡£
±¾ÎĵµÒÑÓÉW3C×éÖ¯³ÉÔ±ºÍÆäËûÏà¹Ø¸÷·½ÉóÔÄ£¬²¢Òѱ»×éÖ¯ÀíÊÂÅú׼ΪW3C½¨Òé¡£ÕâÊÇÒ»¸öÎȶ¨µÄÎĵµ£¬¿ÉÒÔÓÃ×÷²Î¿¼²ÄÁÏ£¬Ò²¿ÉÒÔ×÷ΪÆäËûÎĵµµÄÕýʽ²Î¿¼ÎÄÏס£W3CÔÚ½¨ÒéÖƶ¨¹ý³ÌÖеÄ×÷ÓÃÊÇÎüÒý¶Ô±¾¹æ·¶µÄ×¢Òâ²¢´Ù½øËüµÄ¹ã·ºÊ¹Óá£ÕâÄÜÔöÇ¿WebµÄ¹¦Äܺͻ¥²Ù×÷ÐÔ¡£
±¾Îĵµ¹æ¶¨ÁËÒ»ÖÖÓÃÓÚWorld Wide WebµÄÓï·¨£¬´ËÓï·¨ÊÇͨ¹ýÈ¡Ò»¸öÒµÒÑ´æÔÚ²¢Òѹ㷺ʹÓõÄÎı¾´¦Àí¹ú¼Ê±ê×¼(±ê׼ͨÓñê¼ÇÓïÑÔ£¬¾Ôö²¹ºÍ¸üÕýµÄISO 8879:1986(E))µÄ×Ó¼¯¶ø´´½¨µÄ¡£ËüÊÇW3C XMLÐж¯×é(XML Activity)µÄ¹¤×÷³É¹û£¬¹ØÓÚXMLÐж¯×éµÄÏêϸÐÅÏ¢¿ÉÒÔÔÚhttp://www.w3.org/XMLÕÒµ½¡£ÔÚhttp://www.w3.org/TR¿ÉÒÔÕÒµ½ÏÖÓÐW3C½¨ÒéºÍÆäËû¼¼ÊõÎĵµµÄÒ»¸öÁÐ±í¡£
±¾¹æ·¶ÖÐʹÓÃÁË[Berners-LeeµÈÈË]¶¨ÒåµÄÒ»¸öÊõÓïURI£¬ËûÃÇÕýÔÚ´ÓʵĵŤ×÷½«¸üÐÂ[IETF RFC1738]ºÍ[IETF RFC1808]¡£
±¾¹æ·¶µÄÒÑÖª´íÎóÁбí¿ÉÒÔÔÚhttp://www.w3.org/XML/xml-19980210-errataÕÒµ½¡£
Ç뽫±¾ÎĵµÖеĴíÎ󱨸æ¸øxml-editor@w3.org¡£
1. Ð÷ÂÛ
1.1 ¿ª·¢ÕߺͿª·¢Ä¿±ê
1.2 ÊõÓï
2. Îļþ
2.1 ¹æ·¶µÄXMLÎļþ
2.2 ×Ö·û
2.3 ͨÓÃÓï·¨³É·Ö
2.4 ×Ö·ûÊý¾ÝºÍ±ê¼Ç
2.5 ×¢ÊÍ
2.6 ´¦ÀíÖ¸Áî
2.7 CDATA¶Î
2.8 ÐòºÍÎļþÀàÐÍÉùÃ÷
2.9 ¶ÀÁ¢ÎļþÉùÃ÷
2.10 ¿Õ°×´¦Àí
2.11 ÐÐβ´¦Àí
2.12 ÓïÑÔ±êʶ
3. Âß¼½á¹¹
3.1 Æðʼ±êÇ©£¬½áÊø±êÇ©ºÍ¿ÕÔªËرêÇ©
3.2 ÔªËØÀàÐÍÉùÃ÷
3.2.1 ÔªËØÐÍÄÚÈÝ
3.2.2 »ìºÏÐÍÄÚÈÝ
3.3 ÊôÐÔ±íÉùÃ÷
3.3.1 ÊôÐÔÀàÐÍ
3.3.2 ÊôÐÔµÄȱʡֵ
3.3.3 ÊôÐÔ-Öµ¶ÔµÄ¹æ·¶»¯
3.4 Ìõ¼þ¶Î
4. ÎïÀí½á¹¹
4.1 ×Ö·ûºÍʵÌåÒýÓÃ
4.2 ʵÌåÉùÃ÷
4.2.1 ÄÚ²¿ÊµÌå
4.2.2 ÍⲿʵÌå
4.3 ÒÑÎöʵÌå
4.3.1 Îı¾ÉùÃ÷
4.3.2 ¹æ·¶µÄÒÑÎöʵÌå
4.3.3 ʵÌåÖеÄ×Ö·û±àÂë
4.4 XML´¦ÀíÆ÷¶ÔʵÌåºÍÒýÓõĴ¦Àí
4.4.1 ²»±»Ê¶±ð
4.4.2 ±»°üº¬
4.4.3 ½øÐÐÑé֤ʱ±»°üº¬
4.4.4 ±»½ûÖ¹
4.4.5 ±»°üº¬ÔÚ³£Á¿ÖÐ
4.4.6 ֪ͨ
4.4.7 ²»´¦Àí
4.4.8 ×÷ΪPE±»°üº¬
4.5 ÄÚ²¿ÊµÌåÖû»Îı¾µÄ¹¹½¨
4.6 Ô¤¶¨ÒåʵÌå
4.7 ¼Ç·¨ÉùÃ÷
4.8 ÎļþʵÌå
5. Ò»ÖÂÐÔ
5.1 ½øÐÐÑéÖ¤ºÍ²»½øÐÐÑéÖ¤µÄ´¦ÀíÆ÷
5.2 ʹÓÃXML´¦ÀíÆ÷
6. ¼Ç·¨
A. ²Î¿¼ÎÄÏ×
A.1 Õýʽ²Î¿¼ÎÄÏ×
A.2 ÆäËû²Î¿¼ÎÄÏ×
B. ×Ö·ûµÄ·ÖÀà
C. XMLºÍSGML(·ÇÕýʽ)
D. ʵÌåºÍ×Ö·ûÒýÓõÄÕ¹¿ª(·ÇÕýʽ)
E. È·¶¨ÐÍÄÚÈÝÄ£ÐÍ(·ÇÕýʽ)
F. ×Ö·û±àÂëµÄ×Ô¶¯¼ì²â(·ÇÕýʽ)
G. W3C XML¹¤×÷×é(·ÇÕýʽ)
¿ÉÀ©Õ¹±ê¼ÇÓïÑÔ£¬ËõдΪXML£¬ÃèÊöÁËÒ»Àà³ÆΪXMLÎļþµÄÊý¾Ý¶ÔÏó£¬Í¬Ê±Ò²²¿·ÖµØÃèÊöÁË´¦ÀíÕâЩÊý¾Ý¶ÔÏóµÄ¼ÆËã»ú³ÌÐòµÄ¶¯×÷¡£XMLÊÇSGML(±ê׼ͨÓñê¼ÇÓïÑÔ[ISO 8879])Õë¶ÔÌض¨Ó¦ÓÃÁìÓòµÄÒ»¸ö×Ó¼¯£¬»òÕß˵ÊÇSGMLµÄÒ»ÖÖÊÜÏÞÐÎʽ¡£¸ù¾Ý¶¨Ò壬XMLÎļþÊǺϺõ¹æ·¶µÄSGMLÎļþ¡£
XMLÎļþÓɳÆΪʵÌåµÄ´æ´¢µ¥Ôª×é³É£¬ÊµÌå¿ÉÒÔ°üº¬ÒÑÎöÊý¾Ý»òδÎöÊý¾Ý¡£ÒÑÎöÊý¾ÝÓÉ×Ö·û×é³É£¬ÆäÖÐһЩ×Ö·û×é³É×Ö·ûÊý¾Ý£¬ÁíһЩ×Ö·û×é³É±ê¼Ç¡£±ê¼ÇÖаüº¬Á˶ÔÎļþ´æ´¢¸ñʽ(storage layout)ºÍÂß¼½á¹¹µÄÃèÊö¡£XMLÌṩÁËÒ»ÖÖ»úÖÆÓÃÓÚÔ¼Êø´æ´¢¸ñʽºÍÂß¼½á¹¹¡£
³ÆΪXML´¦ÀíÆ÷µÄÈí¼þÄ£¿éÓÃÓÚ¶ÁÈ¡XMLÎļþ£¬´æÈ¡ÆäÖеÄÄÚÈݺͽṹ¡£XML´¦ÀíÆ÷±»ÉèÏëΪÊÇΪÁíÒ»¸ö³ÆΪӦÓõÄÄ£¿é×÷´¦Àí¡£±¾¹æ·¶´ÓXML´¦ÀíÆ÷Ó¦ÈçºÎ¶ÁÈ¡XMLÊý¾ÝÒÔ¼°Ó¦ÏòÓ¦ÓÃÌṩÄÄЩÐÅÏ¢µÄÕâÁ½¸ö·½Ã棬ÃèÊöÁËÒªÇóXML´¦ÀíÆ÷×÷³öµÄ¶¯×÷¡£
XMLÓÉXML¹¤×÷×é(ÔÏȵÄSGML±à¼Éó²éίԱ»á)¿ª·¢£¬´Ë¹¤×÷×éÓÉWorld Wide Web Consortium(W3C)ÔÚ1996ÄêÖ÷³Ö³ÉÁ¢¡£¹¤×÷×éÓÉSun MicrosystemsµÄJon Bosak¸ºÔð£¬Í¬ÑùÓÉW3C×éÖ¯µÄXML SIG(Special Interest Group)(ÔÏȵÄSGML¹¤×÷×é)»ý¼«²ÎÓëÁËXML¹¤×÷×éµÄ¹¤×÷¡£XML¹¤×÷×éµÄ³ÉÔ±ÔÚ¸½Â¼Öиø³ö¡£ ¹¤×÷×éÓëW3CµÄÁªÏµÈËÊÇDan Connolly¡£
XMLµÄÉè¼ÆÄ¿±êÈçÏ£º
±¾¹æ·¶ÓëÆäËûÏà¹ØµÄ±ê×¼Ò»Æð(UnicodeºÍISO/IEC 10646¶¨ÒåÁË×Ö·û¼¯£¬Internet RFC1766¶¨ÒåÁËÓïÑÔʶ±ðÂ룬ISO 639¶¨ÒåÁËÓïÑÔÃû³Æ´úÂ룬ISO 3166¶¨ÒåÁ˹ú¼ÒÃû³Æ´úÂë)£¬ÌṩÁËÀí½âXML°æ±¾1.0ºÍ¹¹½¨ÏàÓ¦¼ÆËã»ú´¦Àí³ÌÐòËùÐèµÄËùÓÐÐÅÏ¢¡£
ÔÚÍêÕû±£ÁôËùÓÐÎı¾ºÍ·¨ÂÉ×¢ÒâÊÂÏîµÄÇ°ÌáÏ£¬±¾°æ±¾µÄXML¹æ·¶¿ÉÒÔ×ÔÓÉ·Ö·¢¡£
ÓÃÓÚÃèÊö XML ÎļþµÄÊõÓïÔڴ˹淶µÄÕýÎÄÖж¨Òå¡£ ÔÚÕâЩ¶¨ÒåÖÐÒÔ¼°ÃèÊöÒ»¸öXML´¦ÀíÆ÷µÄ¶¯×÷ʱ£¬Ê¹ÓÃÁËϱíÖеÄÊõÓ
Èç¹ûÒ»¸öÊý¾Ý¶ÔÏóÂú×ã±¾¹æ·¶Öй淶µÄ¶¨Òåʱ£¬ËüÊÇÒ»¸öXMLÎļþ¡£Ò»¸ö¹æ·¶µÄXMLÎļþ¿ÉÒÔ¸ü½øÒ»²½ÊÇÓÐЧµÄÈç¹ûËüÂú×ãijЩ½øÒ»²½µÄÔ¼Êø¡£
ÿһ¸öXMLÎļþ¶¼ÓÐÂß¼ºÍÎïÀí½á¹¹¡£ÎïÀíÉ϶øÑÔ£¬ÎļþÓɳÆΪʵÌåµÄµ¥Ôª×é³É¡£Ò»¸öʵÌå¿ÉÒÔÒýÓÃ(refer)ÆäËûʵÌ壬½«ËüÃÇ°üº¬ÔÚÎļþÖС£Îļþ¿ªÊ¼ÓÚ"¸ù(root)"»òÎļþʵÌåÖС£Âß¼É϶øÑÔ£¬ÎļþÓÉÉùÃ÷£¬ÔªËØ£¬×¢ÊÍ£¬×Ö·ûÒýÓúʹ¦ÀíÖ¸Áî×é³É£¬ËùÓÐÕâЩ¶¼ÔÚÎļþÖÐÓÃÏÔʽ±ê¼ÇÖ¸Ã÷¡£Âß¼ºÍÎïÀí½á¹¹±ØÐëÈç"4.3.2 ¹æ·¶µÄÒÑÎöʵÌå"ÖÐËùÃèÊöÄÇÑùÑϸñµØǶÌס£
Ò»¸öÎı¾¶ÔÏóÊÇÒ»¸ö¹æ·¶µÄXMLÎļþÈç¹ûËüÂú×㣺
document
²úÉúʽ¡£Îļþ | ||||
|
Æ¥Åädocument
²úÉúʽÒâζ×Å£º
ÕâÑù×öµÄ½á¹ûÊÇ£¬¶ÔÓÚÿһ¸ö·Ç¸ùµÄÔªËØC
£¬ÎļþÖÐÁíÓÐÒ»¸öÔªËØP
£¬C
ÔÚP
µÄÄÚÈÝÖУ¬¶ø²»ÔÚÆäËûÈκα»P
Ëù°üº¬µÄÔªËصÄÄÚÈÝÖС£P
±»³ÆΪC
µÄ¸¸ÔªËØ(parent)£¬¶øC
±»³ÆΪP
µÄ×ÓÔªËØ(child)¡£
Ò»¸öÒÑÎöʵÌå°üº¬Îı¾(text)£¬Îı¾ÊÇÒ»¸ö×Ö·û(character)ÐòÁУ¬¿ÉÒÔ±íʾ±ê¼Ç»ò×Ö·ûÊý¾Ý¡£Ò»¸ö×Ö·ûÊÇISO/IEC 10646[ISO/IEC 10646]Öж¨ÒåµÄÎı¾×îСµ¥Ôª¡£ºÏ·¨µÄ×Ö·û°üÀ¨ÖƱí·û£¬»Ø³µ£¬»»ÐÐÒÔ¼°UnicodeºÍISO/IEC 10646Öж¨ÒåµÄºÏ·¨µÄͼÐÎ×Ö·û¡£²»ÌᳫʹÓÃ[Unicode]6.8½ÚÖж¨ÒåµÄ"¼æÈÝ×Ö·û(compatibility characters)"¡£
×Ö·û·¶Î§ | ||||||
|
½«×Ö·û´úÂë±àÂë³ÉλģÐ͵ĻúÖƸ÷¸öʵÌå¼ä¿ÉÄÜ»áÓÐËù²»Í¬¡£ËùÓеÄXML´¦ÀíÆ÷±ØÐë½ÓÊÜ10646ÖеÄUTF-8ºÍUTF-16±àÂ룻ÓÃÓÚÖ¸³öËùÓñàÂë»òÖ¸¶¨Ê¹ÓÃÆäËû±àÂëµÄ»úÖÆÔÚºóÃæµÄ"4.3.3 ʵÌåÖеÄ×Ö·û±àÂë"ÖÐÌÖÂÛ¡£
±¾½ÚÖж¨ÒåÁËһЩÔÚÎÄ·¨Öй㷺ʹÓõķûºÅ¡£
S
(¿Õ°×)°üÀ¨Ò»¸ö»ò¶à¸ö¿Õ¸ñ×Ö·û(#x20)£¬»Ø³µ£¬»»ÐкÍÖƱí·û¡£
¿Õ°× | ||||
|
Ϊ·½±ãÆð¼û£¬×Ö·û±»·ÖΪ×Öĸ£¬Êý×ÖºÍÆäËû×Ö·ûÈýÀà¡£×Öĸ¿ÉÒÔÊÇ×Öĸ±íÖеÄ×Öĸ£¬»òÊÇÒ»¸öÒô½Ú»ù×Ö·û(syllabic base character)ºó¸úÒ»¸ö»ò¶à¸ö×éºÏ×Ö·û£¬Ò²¿ÉÒÔÊÇÒ»¸ö±íÒâ×Ö·û¡£ÔÚ"B. ×Ö·ûµÄ·ÖÀà"Öиø³öÁËÿһÀà×Ö·ûµÄÍêÕû¶¨Òå¡£
Ãû×Ö(name)ÊÇÒÔ×Öĸ»òijЩ±êµã·ûºÅ¿ªÍ·µÄ¼ÇºÅ£¬ºó¸ú×Öĸ£¬Êý×Ö£¬Á¬×Ö·û£¬Ï»®Ïߣ¬Ã°ºÅ»ò¾äºÅ£¬ÕâЩ·ûºÅͳ³ÆΪÃüÃû×Ö·û(name character)¡£ÒÔ"xml
"»òÆäËûÈκÎÆ¥Åä (('X'|'x') ('M'|'m') ('L'|'l'))
µÄ×Ö·û´®¿ªÍ·µÄÃû×Ö£¬±»±£ÁôÓÃÓÚ±¾¹æ·¶µÄ´Ë°æ±¾»òºóÐø°æ±¾µÄ±ê×¼»¯¡£
×¢Ò⣺XMLÃû×ÖÖеÄðºÅ±»±£ÁôÓÃÓÚÃû×Ö¿Õ¼ä(name space)ʵÑé¡£ËüµÄº¬ÒåÓдýÓÚÈÕºó±ê×¼»¯£¬ÄÇʱÄÇЩ½«Ã°ºÅÓÃÓÚʵÑéÄ¿µÄµÄÎļþÓпÉÄÜÐèÒª¸üС£(²»±£Ö¤XML²ÉÓõÄÈκÎÃû×Ö¿Õ¼ä»úÖÆ»áʵ¼Ê²ÉÓÃðºÅ×÷Ϊ¶¨½ç·û¡£)ʵ¼ÊÉÏ£¬ÕâÒâζ×ųý·ÇÓÃÓÚÃû×Ö¿Õ¼äʵÑ飬XMLÎļþ×÷Õß²»Ó¦¸ÃÔÚXMLÃû×ÖÖÐʹÓÃðºÅ£¬µ«XML´¦ÀíÆ÷Ó¦¸Ã½ÓÊÜðºÅ×÷Ϊһ¸öÃüÃû×Ö·û¡£
Nmtoken
(Ãû×ּǺţ¬name token)ÊÇÈκÎÃüÃû×Ö·ûµÄ»ìºÏÌå¡£
Ãû×ֺͼǺŠ| ||||||||||||||||||||
|
³£Á¿Êý¾ÝÊÇÈκÎÓÃÒýºÅÀ¨ÆðµÄ×Ö·û´®£¬²»°üÀ¨ÓÃ×÷¶¨½ç·ûµÄÒýºÅ¡£³£Á¿ÓÃÓÚÖ¸Ã÷ÄÚ²¿ÊµÌåµÄÄÚÈÝ(EntityValue
)£¬ÊôÐÔÖµ(AttValue
)£¬ÒÔ¼°Íⲿ±êʶ·û(SystemLiteral
)¡£×¢Ò⣬¶ÔSystemLiteral
µÄÓï·¨·ÖÎö¿ÉÒÔ²»É¨Ãè±ê¼Ç¡£
³£Á¿ | ||||||||||||||||||||||||||||
|
Îı¾ÓÉ×Ö·ûÊý¾ÝºÍ±ê¼Ç»ìºÏ¹¹³É¡£±ê¼Ç°üÀ¨Æðʼ±êÇ©£¬½áÊø±êÇ©£¬¿ÕÔªËرêÇ©£¬ÊµÌåÒýÓã¬×Ö·ûÒýÓã¬×¢ÊÍ£¬CDATA¶Î¶¨½ç·û£¬ÎļþÀàÐÍÉùÃ÷ºÍ´¦ÀíÖ¸Áî¡£
ÆäËûËùÓзDZê¼ÇµÄÎı¾×é³ÉÎļþµÄ×Ö·ûÊý¾Ý¡£
"and"ºÅ(&)ºÍ×ó¼âÀ¨ºÅ(<)Ö»ÓÐ×÷Ϊ±ê¼Ç¶¨½ç·û£¬»òÔÚ×¢ÊÍ£¬´¦ÀíÖ¸Á»òCDATA¶ÎÖÐʱ²ÅÄÜÒÔ³£Á¿ÐÎʽ³öÏÖ¡£ËüÃÇÔÚÒ»¸öÄÚ²¿ÊµÌåÉùÃ÷µÄ³£Á¿ÊµÌåÊýÖµÖÐÒ²ÊǺϷ¨µÄ£¬²Î¼û"4.3.2 ¹æ·¶µÄÒÑÎöʵÌå"¡£Èç¹ûÔÚÆäËûµØ·½ÐèÒªÓõ½ÕâÁ½¸ö×Ö·û£¬ËüÃDZØÐëÓÃÊýֵʽ×Ö·ûÒýÓÃÀ´×ªÒå»ò·Ö±ðÓÃ×Ö·û´®"&
"ºÍ"<
"±íʾ¡£ÓÒ¼âÀ¨ºÅ(>)¿ÉÒÔÓÃ">
"±íʾ£¬¶øµ±ËüÔÚÄÚÈÝÖеÄ×Ö·û´®"]]>
"ÖгöÏÖ£¬µ«´Ë×Ö·û´®²»±íʾһ¸öCDATA¶ÎµÄ½áÊøʱ£¬³öÓÚ¼æÈÝÐÔ¿¼ÂÇ£¬±ØÐëÓÃ">
"»òÒ»¸ö×Ö·ûÒýÓÃתÒåµÃµ½¡£
ÔÚÒ»¸öÔªËصÄÄÚÈÝÖУ¬×Ö·ûÊý¾Ý¿ÉÒÔÊDz»°üÀ¨Èκαê¼ÇµÄÆðʼ¶¨½ç·ûµÄÈÎÒâ×Ö·û´®¡£ÔÚÒ»¸öCDATA¶ÎÖУ¬×Ö·ûÊý¾Ý¿ÉÒÔÊDz»°üÀ¨CDATA¶Î½áÊø¶¨½ç·û"]]>
"µÄÈÎÒâ×Ö·û´®¡£
ΪÁËÔÊÐíÔÚÊôÐÔÖµÖаüº¬µ¥ÒýºÅºÍË«ÒýºÅ£¬Ê¡ÂÔ·û»ò³Æµ¥ÒýºÅ(')¿ÉÒÔ±»±íʾΪ"'
"£¬¶øË«ÒýºÅ(")¿ÉÒÔ±»±íʾΪ""
"¡£
×Ö·ûÊý¾Ý | ||||
|
×¢ÊÍ¿ÉÒÔÔÚÆäËû±ê¼ÇÖ®ÍâµÄÎļþÖеÄÈκÎλÖóöÏÖ¡£ÁíÍ⣬ËüÃÇ¿ÉÒÔÔÚÎļþÀàÐÍÉùÃ÷ÖÐÎÄ·¨ÔÊÐíµÄµØ·½³öÏÖ¡£ËüÃDz»ÊÇÎļþ×Ö·ûÊý¾ÝµÄÒ»²¿·Ö£¬XML´¦ÀíÆ÷¿ÉÒÔ£¬µ«²»ÊDZØÐ룬ÔÊÐíÒ»¸öÓ¦ÓüìË÷×¢ÊÍÎı¾¡£³öÓÚ¼æÈÝÐÔ¿¼ÂÇ£¬×Ö·û´®"--
"(Ë«Á¬×Ö·û)²»ÄÜÔÚ×¢ÊÍÖгöÏÖ¡£
×¢ÊÍ | ||||
|
×¢Ê͵ÄÒ»¸öÀý×Ó£º
<!-- declarations for <head> & <body> --> |
´¦ÀíÖ¸Áî(PI)ÔÊÐíÎļþÖаüº¬ÓÉÓ¦ÓÃÀ´´¦ÀíµÄÖ¸Áî¡£
´¦ÀíÖ¸Áî | ||||||||
|
PI²»ÊÇÎļþ×Ö·ûÊý¾ÝµÄÒ»²¿·Ö£¬µ«±ØÐë´«µÝ¸øÓ¦Óá£PIÒÔÓÃÓÚָʾ´«µÝ¸øÄĸöÓ¦ÓõÄÄ¿±ê(PITarget
)¿ªÍ·£¬Ä¿±êÃû×Ö"XML
"£¬"xml
"£¬µÈµÈ£¬±£ÁôÓÃÓÚ±¾¹æ·¶µÄ´Ë°æ±¾»òºóÐø°æ±¾µÄ±ê×¼»¯¡£XML¼Ç·¨»úÖÆ¿ÉÒÔÓÃÓÚPIÄ¿±êµÄÐÎʽ»¯ÉùÃ÷¡£
CDATA¶Î¿ÉÒÔ³öÏÖÔÚ×Ö·ûÊý¾Ý¿ÉÒÔ³öÏÖµÄÈκεط½£¬ËüÃÇÓÃÓÚתÒå°üº¬»á±»Ê¶±ðΪ±ê¼ÇµÄ×Ö·û´®µÄÎı¾¿é¡£CDATA¶ÎÒÔ×Ö·û´®"<![CDATA[
"¿ªÊ¼£¬ÒÔ×Ö·û´®"]]>
"½áÊø£º
CDATA¶Î | ||||||||||||||||
|
ÔÚÒ»¸öCDATA¶ÎÄÚ£¬Ö»ÓÐCDEnd
×Ö·û´®±»Ê¶±ðΪ±ê¼Ç£¬Òò´Ë×ó¼âÀ¨ºÅºÍ"&"¿ÉÒÔÒÔËüÃǵij£Á¿ÐÎʽ³öÏÖ£¬²»ÐèÒª(Ò²²»ÄÜ)±»»»ÂëΪ"<
"ºÍ"&
"¡£CDATA¶Î²»ÄÜǶÌס£
Ò»¸öCDATA¶ÎµÄÀý×Ó£¬ÆäÖÐ"<greeting>
"ºÍ"</greeting>
"±»Ê¶±ðΪ×Ö·ûÊý¾Ý£¬¶ø²»ÊDZê¼Ç£º
<![CDATA[<greeting>Hello, world!</greeting>]]> |
XMLÎļþ¿ÉÒÔ£¬Ò²Ó¦¸ÃÒÔÒ»¸öXMLÉùÃ÷¿ªÊ¼£¬ÆäÖÐÖ¸Ã÷ÁËËùÓÃXMLµÄ°æ±¾¡£ ÀýÈ磬ÒÔÏÂÊÇÒ»¸öÍêÕûµÄXMLÎļþ£¬ËüÊǹ淶µÄ£¬µ«²»ÊÇÓÐЧµÄ£º
<?xml version="1.0"?> |
ÏÂÃæÕâ¸öҲͬÑù£º
<greeting>Hello, world!</greeting> |
°æ±¾ºÅ"1.0
"Ó¦¸ÃÓÃÓÚ±íÃ÷¶ÔÓë¹æ·¶´Ë°æ±¾ÏàÒ»Ö£¬Èç¹ûʹÓÃÁËÖµ"1.0
"µ«ÓÖÓë±¾¹æ·¶µÄ´Ë°æ±¾²»Ò»Ö£¬ÄÇôÕâÊÇÎļþµÄÒ»¸ö´íÎó¡£XML¹¤×÷×é´òË㸳Óè±¾¹æ·¶µÄºóÐø°æ±¾²»Í¬ÓÚ"1.0
"µÄÊýÖµ£¬µ«Õâ²¢²»´ú±í¿ª·¢ºóÐø°æ±¾µÄ³Ðŵ£¬Ò²²»´ú±íÈç¹ûÓкóÐø°æ±¾£¬»áʹÓÃÈκÎÌØÊâµÄÃüÃû·½°¸µÄ³Ðŵ¡£ÒòΪ²»ÅųýÓкóÐø°æ±¾µÄ¿ÉÄÜÐÔ£¬ÌṩÁ˱¾¹¹Ôì(construct)×÷Ϊһµ©ÐèҪʱ½øÐÐ×Ô¶¯°æ±¾Ê¶±ðµÄÊֶΡ£µ±´¦ÀíÆ÷ÊÕµ½µÄÎļþ±êÓÐËüÃDz»Ö§³ÖµÄ°æ±¾Ê±£¬¿ÉÒÔ¸ø³öÒ»¸ö´íÎó¡£
XMLÎļþÖбê¼ÇµÄ¹¦ÄÜÊÇÃèÊöÎļþµÄ´æ´¢¸ñʽºÍÂß¼½á¹¹£¬²¢½«ÊôÐÔ-Öµ¶ÔºÍÂß¼½á¹¹¹ØÁªÆðÀ´¡£XMLÌṩһÖÖ³ÆΪÎļþÀàÐÍÉùÃ÷µÄ»úÖÆ£¬ÓÃÓÚ¶¨Òå¶ÔÂß¼½á¹¹µÄÔ¼Êø£¬Ö§³ÖÔ¤¶¨Òå´æ´¢µ¥ÔªµÄʹÓá£Èç¹ûÒ»¸öXMLÎļþÓÐÏàÓ¦µÄÎļþÀàÐÍÉùÃ÷²¢ÇÒËü×ñÑÆäÖеÄÔ¼Êø£¬Ôò³ÆËüÊÇÓÐЧµÄ(valid)¡£
ÎļþÀàÐÍÉùÃ÷±ØÐëλÓÚÎļþµÚÒ»¸öÔªËØ֮ǰ¡£
Ðò | ||||||||||||||||||||||||
|
XMLÎļþÀàÐÍÉùÃ÷°üº¬»òÖ¸Ïòxmlrkupdecl">±ê¼ÇÉùÃ÷£¬±ê¼ÇÉùÃ÷ÌṩijһÀàÎļþµÄÎÄ·¨¡£ÕâÖÖÎÄ·¨±»³ÆΪÎļþÀàÐͶ¨Òå(document type difinition£¬DTD)¡£ÎļþÀàÐͶ¨Òå¿ÉÒÔÖ¸ÏòÒ»¸öÍⲿ×Ó¼¯(Ò»ÖÖÌØÊâÀàÐ͵ÄÍⲿʵÌå)£¬»òÕß¿ÉÒÔÔÚÒ»¸öÄÚ²¿×Ó¼¯ÖÐÖ±½Ó°üº¬±ê¼ÇÉùÃ÷£¬»òÕßÁ½Õß¼æÓá£Ò»¸öÎļþµÄÎļþÀàÐͶ¨ÒåÓÉÕâÁ½¸ö×Ó¼¯ºÏÔÚÒ»Æð×é³É¡£
±ê¼ÇÉùÃ÷¿ÉÒÔÊÇÔªËØÀàÐÍÉùÃ÷£¬ÊôÐÔ±íÉùÃ÷£¬ÊµÌåÉùÃ÷£¬»òÊǼǷ¨ÉùÃ÷¡£ÕâЩÉùÃ÷¿ÉÒÔÈçÏÂÃæ¹æ·¶ÐÔºÍÓÐЧÐÔÔ¼ÊøÖÐËùÊö£¬È«²¿»ò²¿·ÖµØ°üº¬ÔÚ²ÎÊýʵÌåÖУ¬ÍêÕûµÄÐÅÏ¢²Î¼û"4. ÎïÀí½á¹¹"¡£
ÎļþÀàÐͶ¨Òå | ||||||||||||||||||
|
±ê¼ÇÉùÃ÷¿ÉÒÔÈ«²¿»ò²¿·ÖµØÓɲÎÊýʵÌåµÄÖû»Îı¾×é³É¡£±¾¹æ·¶ºóÃæµÄ¸÷¸ö·ÇÖÕ½á·û(elementdecl
£¬AttlistDecl
£¬µÈµÈ)²úÉúʽÃèÊöµÄÊÇÔÚËùÓеIJÎÊýʵÌå±»°üº¬(include)Ö®ºóµÄÉùÃ÷¡£
ÓÐЧÐÔÔ¼Êø: ¸ùÔªËØÀàÐÍ(Root Element Type)
ÎļþÀàÐÍÉùÃ÷ÖеÄName
±ØÐëÆ¥Åä¸ùÔªËصÄÀàÐÍ¡£
ÓÐЧÐÔÔ¼Êø: ÑϸñµÄÉùÃ÷/PEǶÌ×
²ÎÊýʵÌåµÄÖû»Îı¾±ØÐëÓñê¼ÇÉùÃ÷ÑϸñǶÌס£¼´£¬Èç¹ûÒ»¸ö±ê¼ÇÉùÃ÷(ÉÏÃæµÄmarkupdecl
)µÄµÚÒ»¸ö»ò×îºóÒ»¸ö×Ö·û±»°üº¬ÓÚÒ»¸ö²ÎÊýʵÌåÒýÓõÄÖû»Îı¾ÖУ¬Á½Õß±ØÐ붼ÔÚ´ËÖû»Îı¾ÖС£
¹æ·¶ÐÔÔ¼Êø: ÄÚ²¿×Ó¼¯ÖеÄPE
ÔÚÄÚ²¿DTD×Ó¼¯ÖУ¬²ÎÊýʵÌåÒýÓÃÖ»ÄܳöÏÖÔÚ±ê¼ÇÉùÃ÷¿ÉÒÔ³öÏֵĵط½£¬¶ø²»ÄÜÔÚ±ê¼ÇÉùÃ÷ÄÚ²¿³öÏÖ¡£(Õâ¸öÔ¼Êø²»ÊÊÓÃÓÚ³öÏÖÔÚÍⲿ²ÎÊýʵÌåÄÚµÄÒýÓã¬Ò²²»ÊÊÓÃÓÚÍⲿ×Ó¼¯¡£)
ͬÄÚ²¿×Ó¼¯Ò»Ñù£¬Íⲿ×Ó¼¯ºÍÈκÎDTDÖÐÒýÓõÄÍⲿ²ÎÊýʵÌ壬±ØÐëÓÉһϵÁб»·ÇÖÕ½á·ûmarkupdecl
ËùÔÊÐíµÄÍêÕûµÄ±ê¼ÇÉùÃ÷×é³É£¬ÆäÖпÉÒÔ¼ÐÔÓ¿Õ°××Ö·û»ò²ÎÊýʵÌåÒýÓᣵ«ÊÇ£¬Íⲿ×Ó¼¯ºÍÍⲿ²ÎÊýʵÌåµÄ²¿·ÖÄÚÈÝ¿ÉÒÔͨ¹ýʹÓÃÌõ¼þ¶Î(conditional
section)±»ÓÐÌõ¼þµØºöÂÔ£¬ÔÚÄÚ²¿×Ó¼¯ÖÐÔò²»ÔÊÐíÕâô×ö¡£
Íⲿ×Ó¼¯ | ||||||||
|
Íⲿ×Ó¼¯ºÍÍⲿ²ÎÊýʵÌåÓëÄÚ²¿ÊµÌ岻֮ͬ´¦»¹ÔÚÓÚ£ºÔÚËüÃÇÄÚ£¬²ÎÊýʵÌåÒýÓò»½ö¿ÉÒÔ³öÏÖÔÚ±ê¼ÇÉùÃ÷¼ä£¬»¹¿ÉÒÔ³öÏÖÔÚ±ê¼ÇÉùÃ÷ÄÚ¡£
ÓÐÎļþÀàÐÍÉùÃ÷µÄXMLÎļþµÄÀý×Ó£º
<?xml version="1.0"?> |
ϵͳ±êʶ·û"hello.dtd
"¸ø³öÁËÎļþDTDµÄURI¡£
ÉùÃ÷Ò²¿ÉÒÔÈçͬÏÂÃæÕâ¸öÀý×ÓÒ»ÑùÖ±½Ó(locally)¸ø³ö£º
<?xml version="1.0" encoding="UTF-8" ?> |
Èç¹ûͬʱʹÓÃÍⲿºÍÄÚ²¿×Ó¼¯£¬×Ó¼¯×Ó¼¯±»¿´³É³öÏÖÔÚÍⲿ×Ó¼¯Ö®Ç°£¬ÕâÒâζ×ÅÄÚ²¿×Ó¼¯ÖеÄʵÌåºÍÊôÐÔ±íÉùÃ÷µÄÓÅÏȼ¶Òª±ÈÔÚÍⲿ×Ó¼¯Öеĸߡ£
µ±Îļþ´ÓXML´¦ÀíÆ÷µÝ¸øÓ¦ÓÃʱ£¬±ê¼ÇÉùÃ÷¿ÉÒÔÓ°ÏìËüµÄÄÚÈÝ£¬ÊôÐÔȱʡֵºÍʵÌåÉùÃ÷ÊÇÆäÖеÄÀý×Ó¡£¿ÉÒÔ×÷ΪXMLÉùÃ÷³É·ÖµÄ¶ÀÁ¢ÎļþÉùÃ÷£¬Ö¸Ã÷Á˶ÔÓÚÎļþʵÌå¶øÑÔ£¬ÊÇ·ñ´æÔÚÍⲿµÄÉùÃ÷¡£
¶ÀÁ¢ÎļþÉùÃ÷ | ||||||
|
ÔÚÒ»¸ö¶ÀÁ¢ÎļþÉùÃ÷ÖУ¬Öµ"yes
"±íʾ¶ÔÓÚÎļþʵÌåûÓÐÍⲿ±ê¼ÇÉùÃ÷(²»ÂÛÊÇÔÚDTDÍⲿ×Ó¼¯ÖУ¬»¹ÊÇÔÚÓÉÄÚ²¿ÊµÌåÒýÓõÄÍⲿ²ÎÊýʵÌåÖÐ)»áÓ°Ïì´ÓXML´¦ÀíÆ÷´«µÝ¸øÓ¦ÓõÄÐÅÏ¢¡£Öµ"no
"±íʾÓлò¿ÉÄÜÓÐÕâÑùµÄÍⲿ±ê¼ÇÉùÃ÷¡£×¢Òâ¶ÀÁ¢ÎļþÉùÃ÷Ö»ÊDZíʾÍⲿÉùÃ÷µÄ´æÔÚ£¬Èç¹ûÎļþÖдæÔÚ¶ÔÍⲿʵÌåµÄÒýÓ㬶øÕâЩʵÌåÒÑÔÚÄÚ²¿ÉùÃ÷ʱ£¬²»Ó°ÏìËüµÄ¶ÀÁ¢×´Ì¬¡£
Èç¹û²»´æÔÚÍⲿ±ê¼ÇÉùÃ÷£¬¶ÀÁ¢ÎļþÉùÃ÷ûÓÐÒâÒå¡£Èç¹û´æÔÚÍⲿ±ê¼ÇÉùÃ÷£¬µ«Ã»ÓжÀÁ¢ÎļþÉùÃ÷£¬¾Í¼Ù¶¨È¡Öµ"no
"¡£
ijЩÍøÂç´«ÊäÓ¦ÓÃÒ²ÐíÐèÒª¶ÀÁ¢µÄÎļþ£¬ÈκÎÂú×ãstandalone="no"
µÄXMLÎļþ¿ÉÒÔͨ¹ýÒ»¶¨µÄË㷨ת»»Îª¶ÀÁ¢Îļþ¡£
ÓÐЧÐÔÔ¼Êø: ¶ÀÁ¢ÎļþÉùÃ÷
¶ÀÁ¢ÎļþÉùÃ÷±ØÐëȡֵΪ"no
"£¬Èç¹ûÈκÎÍⲿ±ê¼ÇÉùÃ÷Öаüº¬£º
amp
£¬lt
£¬gt
£¬apos
£¬quot
µÄ)ʵÌåµÄÉùÃ÷£¬¶ø¶ÔÕâЩʵÌåµÄÒýÓóöÏÖÔÚÎļþÖеĻ°¡£¾ßÓжÀÁ¢ÎļþÉùÃ÷µÄXMLÉùÃ÷µÄÀý×Ó£º
<?xml version="1.0" standalone='yes'?> |
ÔÚ±à¼XMLÎļþʱ£¬Ê¹ÓÃ"¿Õ°×"(¿Õ¸ñ£¬ÖƱí·û£¬¿ÕÐУ¬ÔÚ±¾¹æ·¶ÖÐÓ÷ÇÖÕ½á·ûS
±íʾ)À´·Ö¿ª±ê¼ÇÒÔ»ñµÃ¸üºÃµÄ¿É¶ÁÐÔÊǺܷ½±ãµÄ¡£Í¨³£ÔÚÎļþµÄ½»¸¶°æ±¾Öв»Ïë°üº¬ÕâЩ¿Õ°×¡£ÁíÒ»·½Ã棬±ØÐë±£ÁôÔÚ½»¸¶°æ±¾ÖеÄÓÐÒâÒåµÄ¿Õ°×ÊǺܳ£¼ûµÄ£¬ÈçÔÚÊ«¸èºÍÔ´ÂëÖеĿհס£
XML´¦ÀíÆ÷±ØÐëʼÖհѲ»ÊDZê¼ÇµÄËùÓÐ×Ö·û´«µÝ¸øÓ¦Óᣠһ¸ö½øÐÐÑéÖ¤µÄXML´¦ÀíÆ÷±ØÐëͬʱ֪ͨӦÓÃÕâЩ×Ö·ûÖеÄÄÇһЩ×é³ÉÁ˳öÏÖÔÚÔªËØÐÍÄÚÈÝÖеĿհס£
¿ÉÒÔÔÚÔªËØÖи½¼ÓÒ»¸öÃûΪxml:space
µÄÌØÊâÊôÐÔ£¬ÒÔ֪ͨӦÓÃÓ¦¸Ã±£Áô´ËÔªËØÖеĿհס£ÔÚÓÐЧµÄÎļþÖУ¬´ËÊôÐÔºÍÆäËûÊôÐÔÒ»Ñù£¬Ê¹ÓÃʱ±ØÐëÉùÃ÷¡£Ëü±ØÐë±»ÉùÃ÷Ϊö¾ÙÀàÐÍ£¬Ö»ÓÐ"default
"ºÍ"preserve
"Á½¸ö¿ÉÄܵÄÖµ¡£ÀýÈ磺
<!ATTLIST poem xml:space (default|preserve) 'preserve'> |
"default
"±íʾ¿ÉÒÔ¶Ô´ËÔªËØʹÓÃÓ¦ÓõÄȱʡ¿Õ°×´¦Àíģʽ£¬"preserve
"±íʾӦÓÃÓ¦¸Ã±£ÁôËùÓеĿհס£ÕâÊÊÓÃÓÚÆäËù´¦ÔªËصÄÄÚÈÝÖеÄËùÓÐÔªËØ£¬³ý·Ç±»ÁíÒ»¸öxml:space
ÊôÐÔµÄʵÀýËù¸²¸Ç¡£
ÈκÎÎļþµÄ¸ùÔªËر»ÈÏΪ¶ÔÓ¦ÓõĿհ״¦Àí·½Ê½²»×÷ÒªÇ󣬳ý·ÇËü¸ø´ËÊôÐÔ¸³ÁËÖµ»ò½«´ËÊôÐÔÉùÃ÷Ϊ´øȱʡֵ¡£
Ϊ±à¼µÄ·½±ãÆð¼û£¬´æ´¢XMLÒÑÎöʵÌåµÄ¼ÆËã»úÎļþ¾³£ÓÃÐÐÀ´×éÖ¯¡£Í¨³£ÕâЩÐÐÓûسµ·û(#xD)ºÍ»»Ðзû(#xA)µÄһЩ×éºÏÀ´·Ö¸ô¡£
ΪÁËʹӦÓõŤ×÷¼òµ¥»¯£¬¶ÔÓÚÒ»¸öÍⲿÒÑÎöʵÌå»òÄÚ²¿ÒÑÎöʵÌåµÄ³£Á¿ÊµÌåÖµÖаüº¬µÄÈκÎÁ½×Ö·û³£Á¿ÐòÁÐ"#xD#xA"»òµ¥¶ÀµÄ³£Á¿#xD£¬XML´¦ÀíÆ÷¶¼Ó¦»»³É#xA´«µÝ¸øÓ¦Óá£(Õâ¿ÉÒÔͨ¹ýÔÚ½øÐÐÓï·¨·ÖÎöÇ°½«ËùÓÐÐзָô·û¹æ·¶³É#xA¶ø·½±ãµØʵÏÖ¡£)
ÔÚ½øÐÐÎļþ´¦Àíʱ£¬±êʶ³öÆäÄÚÈÝËùʹÓõÄ×ÔÈ»»òÐÎʽ»¯ÓïÑÔ¾³£ÊǺÜÓÐÓõġ£¿ÉÒÔÔÚÎļþÖвåÈëÒ»¸öÃûΪxml:lang
µÄÌØÊâÊôÐÔÓÃÓÚÖ¸³öXMLÎļþÖÐÈκÎÔªËصÄÄÚÈݺÍÊôÐÔËùʹÓõÄÓïÑÔ¡£ÔÚÓÐЧµÄÎļþÖУ¬´ËÊôÐÔºÍÆäËûÊôÐÔÒ»Ñù£¬Ê¹ÓÃʱ±ØÐëÉùÃ÷¡£´ËÊôÐÔµÄÖµÊÇ[IETF RFC 1766]£¬"ÓïÑÔ±êʶÂë"Öж¨ÒåµÄÓïÑÔ±êʶ·û£º
ÓïÑÔ±êʶ | ||||||||||||||||||||||||
|
Langcode
¿ÉÒÔÊÇÏÂÁÐÖµ£º
i-
I-")¿ªÍ·¡£x-
"»ò"X-
"¿ªÍ·£¬ÒÔ±£Ö¤ËüÃDz»»áºÍÒÔºó¾IANA±ê×¼»¯»òÔÚIANA×¢²áµÄÃû×ÖÏà³åÍ»¡£¿ÉÒÔÓÐÈÎÒâ¶à¸öSubcode
¶Î£¬Èç¹ûµÚÒ»¸ö×Ó´úÂë¶Î´æÔÚ£¬²¢ÇÒ×Ó´úÂëÓÉÁ½¸ö×Öĸ×é³É£¬ÄÇô´Ë×Ó´úÂë±ØÐëÊÇ[ISO 3166]£¬"¹ú¼ÒÃû³ÆµÄ±íʾÂë"Öж¨ÒåµÄ¹ú¼Ò´úÂë¡£Èç¹ûµÚÒ»¸ö×Ó´úÂë¶àÓÚÁ½¸ö×Öĸ£¬ÄÇôËü±ØÐëÊÇÔÚIANA×¢²áµÄÓïÑÔ´úÂëËù±íʾµÄÓïÑÔµÄ×Ó´úÂ룬³ý·ÇËüLangcode
ÒÔǰ׺"x-
"»ò"X-
"¿ªÍ·¡£
Ï°¹ßÉÏÓÃСд×Öĸ¸ø³öÓïÑÔ´úÂ룬Óôóд×Öĸ¸ø³ö¹ú¼Ò´úÂë(Èç¹ûÓеĻ°)¡£×¢ÒâÕâЩֵÓëXMLÎļþÖеÄÆäËûÃû×Ö²»Í¬£¬ÊÇ´óСдÎ޹صġ£
¾ÙÀýÈçÏ£º
<p xml:lang="en">The quick brown fox jumps over the lazy dog.</p> |
xml:lang
Ëù±íʾµÄÓïÑÔÑ¡ÔñÊÊÓÃÓÚËüËù´¦ÔªËصÄËùÓÐÊôÐÔºÍÄÚÈÝ£¬³ý·Ç±»´ËÄÚÈÝÖеÄÔªËØÄÚµÄÁíÒ»¸öxml:lang
µÄʵÀýËù¸²¸Ç¡£
xml:lang
µÄÒ»¸ö¼òµ¥ÉùÃ÷¿ÉÒÔ²ÉÓÃÈçÏÂÐÎʽ£º
xml:lang NMTOKEN #IMPLIED |
µ«ÊÇÈç¹ûºÏÊʵĻ°£¬Ò²¿ÉÒÔ¸ø³öÌض¨µÄȱʡֵ¡£ÔÚÒ»±¾¹©Ó¢¹úѧÉúʹÓõķ¨ÎÄÊ«¸è¼¯ÖУ¬ÆÀ×¢ºÍ×¢½âʹÓÃÓ¢Óxml:langÊôÐÔ¿ÉÒÔÕâÑùÉùÃ÷£º
<!ATTLIST poem xml:lang NMTOKEN 'fr'> |
ÿ¸öXMLÎļþ°üº¬Ò»¸ö»ò¶à¸öÔªËØ£¬ËüÃǵı߽çÓÃÆðʼ±êÇ©ºÍ½áÊø±êÇ©·Ö¸ô£¬»òÕߣ¬¶ÔÓÚ¿ÕÔªËØ£¬ÓÃÒ»¸ö¿ÕÔªËرêÇ©·Ö¸ô¡£Ã¿Ò»¸öÔªËØÓÐÒ»¸öÓÃÃû×Ö±êʶµÄÀàÐÍ£¬ÓÐʱ³Æ֮ΪËüµÄ"ͨÓñêʶ·û(generic identifier)"(GI)£¬Í¬Ê±Ëü¿ÉÒÔÓÐÒ»¸öÊôÐÔֵ˵Ã÷(attribute specification)¼¯¡£Ã¿Ò»¸öÊôÐÔֵ˵Ã÷ÓÐÒ»¸öÃû×ÖºÍÒ»¸öÖµ¡£
ÔªËØ | ||||||||||||||||
|
³ýÁËÄÇЩ¿ªÍ·Æ¥Åä(('X'|'x')('M'|'m')('L'|'l'))
µÄÃû×Ö±£ÁôÓÃÓÚ±¾¹æ·¶µÄ´Ë°æ±¾ºÍºó¼Ì°æ±¾µÄ±ê×¼»¯Í⣬±¾¹æ·¶²»¶ÔÔªËØÀàÐͺÍÊôÐÔµÄÓïÒ壬Ó÷¨ºÍÃû×Ö(Óï·¨Ö®Íâ)×÷³öÏÞÖÆ¡£
¹æ·¶ÐÔÔ¼Êø: ÔªËØÀàÐÍÆ¥Åä
ÔªËؽáÊø±êÇ©ÖеÄName
±ØÐëºÍÆðʼ±êÇ©ÖеÄÔªËØÀàÐÍÏàÆ¥Åä¡£
ÓÐЧÐÔÔ¼Êø: ÔªËØÓÐЧÐÔ
Èç¹ûÓÐÒ»¸öÓëelementdecl
ÏàÆ¥ÅäµÄÉùÃ÷µÄName
ÓëÔªËØÀàÐÍÏàÆ¥Å䣬ÇÒÏÂÊöÖ®Ò»³ÉÁ¢Ê±£¬³Æ´ËÔªËØÊÇÓÐЧµÄ£º
EMPTY
ÏàÆ¥Å䣬ͬʱ´ËÔªËØûÓÐÄÚÈÝ¡£children
ÏàÆ¥Å䣬ͬʱ×ÓÔªËصÄÐòÁÐÊôÓÚÄÚÈÝÄ£ÐÍÖеÄÕýÔò±í´ïʽËù²úÉúµÄÓïÑÔ£¬ÔÚÿ¶Ô×ÓÔªËؼäÔÊÐíÓпհ×(Æ¥Åä·ÇÖÕ½á·ûS
µÄ×Ö·û)¡£Mixed
ÏàÆ¥Å䣬ͬʱÄÚÈÝÓÉÆäÀàÐÍÆ¥ÅäÄÚÈÝÄ£ÐÍÖеÄÃû×ÖµÄ×Ö·ûÊý¾ÝºÍ×ÓÔªËØ×é³É¡£ANY
ÏàÆ¥Å䣬ͬʱÿ¸ö×ÓÔªËصÄÀàÐ;ùÒÑÉùÃ÷¡£Ã¿Ò»¸ö·Ç¿ÕXMLÔªËØÒÔÒ»¸öÆðʼ±êÇ©×÷Ϊ¿ªÊ¼µÄ±ê¼Ç¡£
Æðʼ±êÇ© | ||||||||||||||||||||||||
|
Æðʼ±êÇ©ºÍ½áÊø±êÇ©ÖеÄName
¸ø³öÁËÔªËصÄÀàÐÍ¡£Name
-AttValue
¶Ô±»Í³³ÆΪԪËصÄÊôÐÔֵ˵Ã÷£¬ÆäÖÐÿһ¶ÔÖеÄName
±»³ÆΪÊôÐÔÃû£¬AttValue
µÄÄÚÈÝ(ÔÚ'
»ò"
¶¨½ç·û¼äµÄÎı¾)±»³ÆΪÊôÐÔÖµ¡£
¹æ·¶ÐÔÔ¼Êø: ΨһµÄÊôÐÔֵ˵Ã÷
Ò»¸öÊôÐÔÃûÖ»ÄÜÔÚͬһ¸öÆðʼ±êÇ©»ò¿ÕÔªËرêÇ©ÖгöÏÖÒ»´Î¡£
ÓÐЧÐÔÔ¼Êø: ÊôÐÔÖµÀàÐÍ
ÊôÐÔ±ØÐë±»ÉùÃ÷£¬ÆäÖµ±ØÐë¾ßÓÐËùÉùÃ÷µÄÀàÐÍ¡£(ÊôÐÔÀàÐͲμû"3.3 ÊôÐÔ±íÉùÃ÷"¡£)
¹æ·¶ÐÔÔ¼Êø: ÎÞÍⲿʵÌåÒýÓÃ
ÊôÐÔÖµ²»ÄÜ°üº¬¶ÔÍⲿʵÌåÖ±½Ó»ò¼ä½ÓµÄʵÌåÒýÓá£
¹æ·¶ÐÔÔ¼Êø: ÔÚÊôÐÔÖµÖÐûÓÐ<
ÔÚÒ»¸öÊôÐÔÖµÖÐÖ±½Ó»ò¼ä½ÓÒýÓõÄʵÌåµÄÖû»Îı¾(³ýÁË"<
")²»ÄÜ°üº¬<
¡£
Æðʼ±êÇ©µÄÒ»¸öÀý×Ó£º
<termdef id="dt-dog" term="dog"> |
ÓÉÒ»¸öÆðʼ±êÇ©¿ªÊ¼µÄÿһ¸öÔªËرØÐëÓÃÒ»¸ö½áÊø±êÇ©±ê¼ÇÆä½áÊø£¬½áÊø±êÇ©ÖеÄÃû×Ö±ØÐëÓëÆðʼ±êÇ©Öиø³öµÄÔªËØÀàÐÍÏàͬ£º
½áÊø±êÇ© | ||||
|
½áÊø±êÇ©µÄÒ»¸öÀý×Ó£º
</termdef> |
ÔÚÆðʼ±êÇ©ºÍ½áÊø±êÇ©ÖеÄÎı¾±»³ÆΪԪËصÄÄÚÈÝ£º
ÔªËصÄÄÚÈÝ | ||||
|
Èç¹ûÔªËصÄÄÚÈÝΪ¿Õ£¬Ëü±ØÐë±íʾΪһ¸öÆðʼ±êÇ©½ô¸úÒ»¸ö½áÊø±êÇ©»ò¿ÕÔªËرêÇ©¡£¿ÕÔªËرêÇ©Ôò²ÉÓÃÒ»ÖÖÌØÊâµÄÐÎʽ£º
¿ÕÔªËرêÇ© | ||||||
|
²»ÂÛÔªËØÊÇ·ñÓùؼü×ÖEMPTY
ÉùÃ÷£¬¿ÕÔªËرêÇ©¶¼¿ÉÒÔÓÃÓÚÈκÎûÓÐÄÚÈݵÄÔªËØ¡£³öÓÚ»¥²Ù×÷ÐÔ¿¼ÂÇ£¬¿ÕÔªËرØÐëÓÃÓÚ£¬ÇÒÖ»ÄÜÓÃÓÚÉùÃ÷ΪEMPTY
µÄÔªËØ¡£
¿ÕÔªËصÄÀý×Ó£º
<IMG align="left" |
³öÓÚÑéÖ¤µÄÄ¿µÄ£¬¿ÉÒÔÓÃÔªËØÀàÐͺÍÊôÐÔ±íÉùÃ÷ÏÞÖÆXMLÎļþÖÐÔªËصĽṹ¡£ÔªËØÀàÐÍÉùÃ÷ÏÞÖÆÁËÔªËصÄÄÚÈÝ¡£
ÔªËØÀàÐÍÉùÃ÷ͨ³£ÏÞÖÆÁË×ÓÔªËصÄÀàÐÍ¡£ÓÉÓû§Ñ¡Ôñ£¬µ±ÉùÃ÷Ìáµ½µÄÔªËØÀàÐÍûÓÐÏàÓ¦µÄÉùÃ÷ʱ£¬XML´¦ÀíÆ÷¿ÉÒÔ¸ø³ö¾¯¸æ£¬µ«Õâ²»ÊÇÒ»¸ö´íÎó¡£
ÔªËØÀàÐÍÉùÃ÷ | ||||||||||
|
ÆäÖÐName
¸ø³öÁËËùÉùÃ÷µÄÔªËØÀàÐÍ¡£
ÓÐЧÐÔÔ¼Êø: ΨһµÄÔªËØÀàÐÍÉùÃ÷
ÔªËØÀàÐÍÖ»ÄÜÉùÃ÷Ò»´Î¡£
ÔªËØÀàÐÍÉùÃ÷µÄÀý×Ó£º
<!ELEMENT br EMPTY> |
µ±Ä³Ò»ÀàÐ͵ÄÔªËØÖ»ÄÜ°üº¬ÓÿÉÑ¡¿Õ°×(Æ¥Åä·ÇÖÕ½á·ûS
)·Ö¸ôµÄ×ÓÔªËØ(ÎÞ×Ö·ûÊý¾Ý)ʱ£¬³Æ´ËÔªËØÀàÐ;ßÓÐÔªËØÐÍÄÚÈÝ¡£ÔÚÕâÖÖÇé¿öÏ£¬ÓÐÄÚÈÝÄ£ÐÍ×÷ΪÀàÐÍÏÞÖÆÖ®Ò»£¬ÄÚÈÝÄ£ÐÍÊǾö¶¨×ÓÔªËØÀàÐͺÍ×ÓÔªËسöÏÖ˳ÐòµÄÒ»ÖÖ¼òµ¥ÎÄ·¨¡£´ËÎÄ·¨ÓÃÄÚÈÝÁ£×Ó(cp
)¹¹½¨£¬ÄÚÈÝÁ£×ÓÓÉÃû×Ö£¬ÄÚÈÝÁ£×ÓµÄÑ¡Ôñ±í(choice list)»òÄÚÈÝÁ£×ÓµÄÐòÁбí(sequence list)×é³É£º
ÔªËØÐÍÄÚÈݵÄÄ£ÐÍ | ||||||||||||||||||||
|
ÆäÖÐÿһ¸öName
ÊÇ¿ÉÒÔ×÷Ϊ×ÓÔªËصÄÔªËصÄÀàÐÍ¡£Ñ¡Ôñ±íÖгöÏÖµÄÈÎÒâÄÚÈÝÁ£×ÓÔÚÔªËØÐÍÄÚÈÝÖÐÔÊÐí³öÏÖµÄλÖöÔÓ¦ÓÚÑ¡Ôñ±íÔÚÎÄ·¨ÖеÄλÖá£ÐòÁбíÖгöÏÖµÄËùÓÐÄÚÈÝÁ£×Ó±ØÐëÒÔÏàͬµÄ˳Ðò³öÏÖÔÚÔªËØÐÍÄÚÈÝÖС£ÔÚÃû×Ö»ò±íÖ®ºóµÄ¿ÉÑ¡×Ö·û(optional character)¾ö¶¨Á˱íÖÐÔªËØ»òÄÚÈÝÁ£×Ó¿ÉÒÔ³öÏÖÒ»´Î»ò¶à´Î(+
)£¬»¹ÊÇÁã´Î»ò¶à´Î(*
)£¬»òÊÇÁã´Î»òÒ»´Î(?
)¡£Ã»ÓÐÕâÑùÒ»¸ö²Ù×÷·ûÒâζ×ÅÔªËØ»òÄÚÈÝÁ£×Ó±ØÐëÇ¡ºÃ³öÏÖÒ»´Î¡£ÕâÖÖÓï·¨ºÍÒâÒåºÍ±¾¹æ·¶ÖеIJúÉúʽÖÐËùʹÓõÄÏàͬ¡£
µ±ÇÒ½öµ±Ò»¸öÔªËصÄÄÚÈÝ¿ÉÒÔͨ¹ýÂú×ãÄÚÈÝÄ£ÐÍÖеÄÑ¡Ôñ£¬ÐòÁкÍÖظ´²Ù×÷·ûµÃµ½£¬²¢ÇÒÄÚÈÝÖеÄÿһ¸öÔªËØÓëÄÚÈÝÄ£ÐÍÖеÄÒ»ÖÖÔªËØÀàÐÍÏàÆ¥Åäʱ£¬³Æ´ËÔªËصÄÄÚÈÝÓë¸ÃÄÚÈÝÄ£ÐÍÏàÆ¥Åä¡£³öÓÚ¼æÈÝÐÔ¿¼ÂÇ£¬ Èç¹ûÎļþµÄij¸öÔªËØ¿ÉÒÔºÍÄÚÈÝÄ£ÐÍÖеÄÒ»ÖÖÔªËØÀàÐͶà´ÎÆ¥Å䣬ÕâÊÇÒ»¸ö´íÎó¡£ ¸üÏêϸµÄÐÅÏ¢²Î¼û"E. È·¶¨ÐÍÄÚÈÝÄ£ÐÍ".
ÓÐЧÐÔÔ¼Êø: ÑϸñµÄ×é/PEǶÌ×
²ÎÊýʵÌåµÄÖû»Îı¾ÓÃÀ¨ºÅÀ¨ÆðµÄ×éÑϸñǶÌס£¼´£¬Èç¹ûchoice
£¬seq
»òMixed
Óï·¨³É·ÖµÄ¿ªÊ¼»ò½áÊøÀ¨ºÅ³öÏÖÔÚij¸ö²ÎÊýʵÌåµÄÖû»Îı¾ÖУ¬Á½Õß±ØÐëͬÔÚ´ËÖû»Îı¾ÖС£³öÓÚ»¥²Ù×÷ÐÔ¿¼ÂÇ£¬Èç¹ûÒ»¸ö²ÎÊýʵÌåÒýÓóöÏÖÔÚchoice
£¬seq
»òMixed
Óï·¨³É·ÖÖÐʱ£¬ËüµÄÖû»Îı¾²»Ó¦Îª¿Õ£¬Í¬Ê±ÆäÖû»Îı¾µÄµÚÒ»¸öºÍ×îºóÒ»¸ö·Ç¿Õ×Ö·û²»Ó¦ÎªÒ»¸öÁ¬½Ó·û(|
»ò,
)¡£
ÔªËØÐÍÄÚÈݵÄÄ£Ð;ÙÀý£º
<!ELEMENT spec (front, body, back?)> |
µ±Ä³ÔªËØÀàÐÍ¿ÉÒÔ°üº¬×Ö·ûÊý¾Ý£¬Æä¼ä¿ÉÒÔËæÒâ´©²å×ÓÔªËØʱ£¬³Æ´ËÔªËØÀàÐ;ßÓлìºÏÐÍÄÚÈÝ¡£ÔÚÕâÖÖÇé¿öÏ£¬¶Ô×ÓÔªËصÄÀàÐÍ¿ÉÄÜÓÐËùÏÞÖÆ£¬µ«¶ÔËüÃǵĴÎÐòºÍ³öÏÖ´ÎÊýûÓÐÏÞÖÆ£º
»ìºÏÐÍÄÚÈÝÉùÃ÷ | ||||||||||||||||
|
ÆäÖÐName
¸ø³öÁË×ÓÔªËصÄÔªËصÄÀàÐÍ¡£
ÓÐЧÐÔÔ¼Êø: ÎÞÖظ´ÀàÐÍ
ͬһÃû×ÖÔÚµ¥¸ö»ìºÏÐÍÄÚÈÝÉùÃ÷ÖÐÖ»ÄܳöÏÖÒ»´Î¡£
»ìºÏÄÚÈÝÉùÃ÷µÄÀý×Ó£º
<!ELEMENT p (#PCDATA|a|ul|b|i|em)*> |
ÊôÐÔÓÃÓÚ¹ØÁªÃû×Ö-Öµ¶ÔºÍÔªËØ¡£ÊôÐÔֵ˵Ã÷Ö»ÄÜÔÚÆðʼ±êÇ©ºÍ¿ÕÔªËرêÇ©ÖгöÏÖ; Òò´Ë£¬ÓÃÓÚʶ±ðËüÃǵIJúÉúʽ³öÏÖÔÚ"3.1 Æðʼ±êÇ©£¬½áÊø±êÇ©ºÍ¿ÕÔªËرêÇ©"ÖС£ÊôÐÔ±íÉùÃ÷¿ÉÒÔÓÃÓÚ£º
ÊôÐÔ±íÉùÃ÷ Ïêϸ˵Ã÷ÁËÓë¸ø¶¨ÔªËØÀàÐÍÏà¹ØÁªµÄÿһ¸öÊôÐÔµÄÃû×Ö£¬Êý¾ÝÀàÐͺÍȱʡֵ(Èç¹ûÓеĻ°)£º
ÊôÐÔ±íÉùÃ÷ | ||||||||
|
AttlistDecl
¹æÔòÖÐName
ÊÇÔªËصÄÀàÐÍ¡£ÓÉÓû§Ñ¡Ôñ£¬µ±ÊôÐÔÉùÃ÷Ïà¹ØµÄÔªËØÀàÐÍûÓб»ÉùÃ÷ʱ£¬XML´¦ÀíÆ÷¿ÉÒÔ¸ø³öÒ»¸ö¾¯¸æ£¬µ«Õâ²»ÊÇÒ»¸ö´íÎó¡£AttDef
¹æÔòÖеÄName
ÊÇÊôÐÔµÄÃû×Ö¡£
µ±Óëij¸ö¸ø¶¨ÔªËØÀàÐÍÏà¹ØµÄAttlistDecl
³¬¹ýÒ»¸öʱ£¬ÕâЩÉùÃ÷ÖеÄÄÚÈݱ»ºÏ²¢ÔÚÒ»Æð¡£µ±¸ø¶¨ÔªËØÀàÐ͵Äij¸öÊôÐԵĶ¨Ò峬¹ýÒ»¸öʱ£¬°ó¶¨µÚÒ»¸ö¶¨Ò壬ÆäÓඨÒå±»ºöÂÔ¡£³öÓÚ»¥²Ù×÷ÐÔ¿¼ÂÇ£¬DTDµÄ×÷Õß¿ÉÒÔÑ¡ÔñÒ»¸ö¸ø¶¨µÄÔªËØÀàÐÍÖÁ¶àÓÐÒ»¸öÊôÐÔ±íÉùÃ÷£¬Ò»¸ö¸ø¶¨µÄÊôÐÔÃûÖÁ¶àÓÐÒ»¸öÊôÐÔ¶¨Ò壬ÒÔ¼°Ã¿¸öÊôÐÔ±íÉùÃ÷ÖÁÉÙÓÐÒ»¸öÊôÐÔ¶¨Òå¡£³öÓÚ»¥²Ù×÷ÐÔ¿¼ÂÇ£¬µ±Ò»¸ö¸ø¶¨ÔªËØÓг¬¹ýÒ»¸öµÄÊôÐÔ±íÉùÃ÷»òÒ»¸ö¸ø¶¨ÊôÐÔÓг¬¹ýÒ»¸öµÄÊôÐÔ¶¨Òåʱ£¬XML´¦ÀíÆ÷¿ÉÒÔ£¬ÓÉÓû§Ñ¡Ôñ£¬¸ø³ö¾¯¸æ£¬µ«Õâ²»ÊÇÒ»¸ö´íÎó¡£
XMLÊôÐÔÓÐÈýÖÖÀàÐÍ£º×Ö·û´®ÀàÐÍ£¬Ò»×é¼ÇºÅ»¯ÀàÐͺÍö¾ÙÀàÐÍ¡£×Ö·û´®ÀàÐÍ¿ÉÒÔÒÔÈÎÒâ³£Á¿×Ö·û´®ÎªÖµ; ¸÷¸ö¼ÇºÅ»¯ÀàÐÍÓв»Í¬µÄ´Ê·¨ºÍÓïÒåÔ¼Êø£¬ÈçÏ£º
ÊôÐÔÀàÐÍ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ÓÐЧÐÔÔ¼Êø: ID
ID
ÀàÐ͵ÄÖµ±ØÐëÆ¥ÅäName
²úÉúʽ¡£×÷Ϊ´ËÀàÐÍÖµµÄÃû×ÖÖ»ÄÜÔÚXMLÎļþÖгöÏÖÒ»´Î;¼´£¬IDÀàÐ͵ÄÖµ±ØÐëÄÜΨһ±êʶԪËØ¡£
ÓÐЧÐÔÔ¼Êø: ÿÖÖÊôÐÔÀàÐÍÒ»¸öID
ÿÖÖÊôÐÔÀàÐÍÖ»ÄÜÓÐÒ»¸öIDÊôÐÔ¡£
ÓÐЧÐÔÔ¼Êø: IDÊôÐÔµÄȱʡֵ
IDÊôÐÔ±ØÐëÓÐÒ»¸öÉùÃ÷Ϊ#IMPLIED
»ò#REQUIRED
µÄȱʡֵ¡£
ÓÐЧÐÔÔ¼Êø: IDREF
IDREF
ÀàÐ͵ÄÖµ±ØÐëÆ¥ÅäName
²úÉúʽ£¬IDREFS
ÀàÐ͵ÄÖµ±ØÐëÆ¥ÅäNames
²úÉúʽ£»Ã¿Ò»¸öName
±ØÐëÆ¥ÅäXMLÎļþÖÐijЩԪËØIDÊôÐÔµÄÖµ£»Ò²¾ÍÊÇ˵£¬IDREF
ÀàÐ͵ÄÖµ±ØÐëÆ¥ÅäijЩIDÊôÐÔµÄÖµ¡£
ÓÐЧÐÔÔ¼Êø: ʵÌåÃû
ENTITY
ÀàÐ͵ÄÖµ±ØÐëÆ¥ÅäName
²úÉúʽ£¬ENTITIES
ÀàÐ͵ÄÖµ±ØÐëÆ¥ÅäNames
²úÉúʽ£»
ÿһ¸öName
±ØÐëÆ¥ÅäDTDÖÐÉùÃ÷µÄδÎöʵÌåµÄÃû×Ö¡£
ÓÐЧÐÔÔ¼Êø: Ãû×ּǺÅ
NMTOKEN
ÀàÐ͵ÄÖµ±ØÐëÆ¥ÅäNmtoken
²úÉúʽ;NMTOKENS
ÀàÐ͵ÄÖµ±ØÐëÆ¥ÅäNmtokens²úÉúʽ¡£
ö¾ÙÀàÐ͵ÄÊôÐÔ¿ÉÒÔÔÚÉùÃ÷ÖÐÌṩµÄÈ¡Öµ±íÖÐÈ¡Öµ¡£ÓÐÁ½ÖÖö¾ÙÀàÐÍ£º
ö¾ÙÊôÐÔÀàÐÍ | ||||||||||||||||
|
Ò»¸öNOTATION
ÀàÐ͵ÄÊôÐÔ±êʶÁËÒ»ÖÖÓÃÓÚ½âÊÍÓë´ËÊôÐÔÏà¹ØµÄÔªËصļǷ¨£¬´Ë¼Ç·¨ÖÐÓÃϵͳ»ò¹«¹²±êʶ·ûÔÚDTDÖÐÉùÃ÷¡£
ÓÐЧÐÔÔ¼Êø: ¼Ç·¨ÊôÐÔ
´ËÀàÐ͵ÄÖµ±ØÐëÓëÉùÃ÷ÖÐËù°üº¬µÄ¼Ç·¨ÃûÖ®Ò»ÏàÆ¥Åä;ÉùÃ÷ÖеÄËùÓмǷ¨Ãû¶¼±ØÐëÉùÃ÷¡£
ÓÐЧÐÔÔ¼Êø: ö¾Ù
´ËÀàÐ͵ÄÖµ±ØÐëÓëÉùÃ÷ÖÐËù°üº¬µÄNmtoken
¼ÇºÅÖ®Ò»ÏàÆ¥Åä¡£
³öÓÚ»¥²Ù×÷ÐÔ¿¼ÂÇ£¬Í¬Ò»Nmtoken
Ö»ÄÜÔÚµ¥¸öÔªËØÀàÐ͵Äö¾ÙÊôÐÔÀàÐÍÖгöÏÖÒ»´Î¡£
ÊôÐÔÉùÃ÷ÌṩµÄÐÅÏ¢Ö¸Ã÷ÁËijÊôÐÔÊÇ·ñ±ØÐë³öÏÖ£¬Í¬Ê±Ö¸Ã÷ÁËÔÚ±»ÉùÃ÷µÄÊôÐÔ²»ÊDZØÐë³öÏÖ¶øÎļþÖÐûÓгöÏÖ´ËÊôÐÔµÄÇé¿öÏ£¬XML´¦ÀíÆ÷Ó¦ÈçºÎ´¦Àí¡£
ÊôÐÔȱʡֵ | ||||||||||||||||||||||||||||
|
ÔÚÒ»¸öÊôÐÔÉùÃ÷ÖУ¬#REQUIRED
±íʾ±ØÐë×ÜÊÇÌṩ´ËÊôÐÔ£¬#IMPLIED
±íʾ²»Ìṩȱʡֵ¡£Èç¹ûÉùÃ÷¼È²»ÊÇ#REQUIRED
£¬Ò²²»ÊÇ#IMPLIED
£¬ÄÇôAttValue
Öµ°üº¬ÁËËùÉùÃ÷µÄȱʡֵ;¹Ø¼ü×Ö#FIXED
¹æ¶¨´ËÊôÐÔ±ØÐë×ÜÊÇÓÐȱʡֵ¡£Èç¹ûÉùÃ÷ÁËÒ»¸öȱʡֵ£¬µ±XML´¦ÀíÆ÷Óöµ½Ò»¸ö±»Ê¡ÂÔµÄÊôÐÔʱ£¬Ëü½«µ±³É´ËÊôÐÔÒÔȱʡֵ³öÏÖ
ÓÐЧÐÔÔ¼Êø: ±ØÐëµÄÊôÐÔ
Èç¹ûȱʡֵÉùÃ÷Êǹؼü×Ö#REQUIRED
£¬ÄÇôÊôÐÔ±íÉùÃ÷ËùÖ¸ÀàÐ͵ÄÔªËØÖж¼±ØÐëÓдËÊôÐÔ¡£
ÓÐЧÐÔÔ¼Êø: ºÏ·¨µÄÊôÐÔȱʡֵ
±»ÉùÃ÷µÄÊôÐÔȱʡֵ±ØÐëÂú×ã±»ÉùÃ÷µÄÊôÐÔÀàÐ͵Ĵʷ¨Ô¼Êø¡£
ÓÐЧÐÔÔ¼Êø: ¹Ì¶¨µÄÊôÐÔȱʡֵ
Èç¹ûijÊôÐÔµÄȱʡֵÓùؼü×Ö#FIXED
ÉùÃ÷£¬´ËÊôÐÔµÄËùÓÐʵÀý±ØÐëÆ¥Åä¸Ãȱʡֵ¡£
ÊôÐÔ±íÉùÃ÷µÄÀý×Ó£º
<!ATTLIST termdef |
ÔÚ½«ÊôÐÔµÄÖµ´«¸øÓ¦Óûò¼ìÑéÓÐЧÐÔ֮ǰ£¬XML´¦ÀíÆ÷±ØÐ뽫Æä¹æ·¶»¯£º
Èç¹û±»ÉùÃ÷µÄÖµ²»ÊÇCDATA£¬ÄÇôXML´¦ÀíÆ÷±ØÐë¼ÌÐø´¦Àí¹æ·¶»¯ºóµÄÖµ£¬È¥µôÆäÇ°µ¼ºÍβËæ¿Õ¸ñ(#x20)×Ö·û£¬²¢½«¿Õ¸ñ(#x20)×Ö·ûÐòÁÐÌæ»»³Éµ¥¸ö¿Õ¸ñ(#x20)×Ö·û¡£
²»½øÐÐÑéÖ¤µÄÓï·¨·ÖÎöÆ÷Ó¦¸Ã½«ËùÓÐÉÐδ¶Áµ½ÉùÃ÷²¿·ÖµÄÊôÐÔµ±³É±»ÉùÃ÷ΪCDATA
¡£
Ìõ¼þ¶ÎÊÇÎļþÀàÐÍÉùÃ÷Íⲿ×Ó¼¯µÄÒ»²¿·Ö£¬È¡¾öÓÚÏàÓ¦µÄ¹Ø¼ü×Ö£¬ËüÃÇ»ò±»°üº¬ÔÚDTDÂß¼½á¹¹Ö®ÄÚ£¬»ò±»ÅųýÔÚDTDÂß¼½á¹¹Ö®Íâ¡£
Ìõ¼þ¶Î | ||||||||||||||||||||
|
ͬÄÚ²¿»òÍⲿDTD×Ó¼¯Ò»Ñù£¬Ìõ¼þ¶Î¿ÉÒÔ°üº¬Ò»¸ö»ò¶à¸öÍêÕûµÄÉùÃ÷£¬×¢ÊÍ£¬´¦ÀíÖ¸Á»òǶÌ×µÄÌõ¼þ¶Î£¬Æä¼ä¿ÉÒÔ¼ÐÔӿհס£
Èç¹ûÌõ¼þ¶ÎµÄ¹Ø¼ü×ÖÊÇINCLUDE
£¬ÄÇôÌõ¼þ¶ÎµÄÄÚÈÝÊÇDTDµÄÒ»²¿·Ö£¬Èç¹ûÌõ¼þ¶ÎµÄ¹Ø¼ü×ÖÊÇIGNORE
£¬ÄÇôÌõ¼þ¶ÎµÄÄÚÈÝÂß¼Éϲ»ÊÇDTDµÄÒ»²¿·Ö¡£×¢Òâ¶ÔÓÚ¿É¿¿µÄÓï·¨·ÖÎö¹ý³Ì£¬ÉõÖÁ±ØÐë¶ÁÈ¡±»ºöÂÔµÄÌõ¼þ¶ÎµÄÄÚÈÝÒÔ¼ì²âǶÌ×µÄÌõ¼þ¶Î£¬±£Ö¤×îÍâ²ã(±»ºöÂÔ)µÄÌõ¼þ¶ÎµÄ½áβ±»Ç¡µ±µØ¼ì²âµ½¡£Èç¹ûÒ»¸ö¹Ø¼ü×ÖΪINCLUDE
µÄÌõ¼þ¶Î³öÏÖÔÚ¸ü´óµÄ¹Ø¼ü×ÖΪIGNORE
µÄÌõ¼þ¶ÎÖУ¬ÄÚÍâÁ½¸öÌõ¼þ¶Î¶¼±»ºöÂÔ¡£
Èç¹ûÌõ¼þ¶ÎµÄ¹Ø¼ü×ÖÊÇÒ»¸ö²ÎÊýʵÌåÒýÓ㬴¦ÀíÆ÷ÔÚ¾ö¶¨ÊÇ·ñ°üº¬»òºöÂÔ´ËÌõ¼þ¶ÎÇ°£¬±ØÐëÏȽ«¸Ã²ÎÊýʵÌåÖû»³ÉÆäÄÚÈÝ¡£
Ò»¸öÀý×Ó£º
<!ENTITY % draft 'INCLUDE' > |
Ò»¸öXMLÎļþ¿ÉÄÜ°üº¬Ò»¸ö»ò¶à¸ö´æ´¢µ¥Ôª¡£ËüÃDZ»³ÆΪʵÌå(entity);ËüÃǶ¼¾ßÓÐÄÚÈݲ¢ÇÒ¶¼ÓÃÃû×Ö½øÐбêʶ(³ýÁËÎļþʵÌ壬¼ûÏ£¬ºÍÍⲿDTD×Ó¼¯Ö®Íâ)¡£Ã¿Ò»¸öXMLÎļþÓÐÒ»¸ö³ÆΪÎļþʵÌåµÄʵÌ壬Ëü×÷ΪXML´¦ÀíÆ÷´¦ÀíµÄÆðµã²¢¿ÉÄÜ°üº¬ÁËÕû¸öÎļþ¡£
ʵÌå¿ÉÒÔÊÇÒÑÎöµÄ»òδÎöµÄ¡£ÒÑÎöʵÌå(parsed entity)µÄÄÚÈݱ»³ÆΪËüµÄÖû»Îı¾;´ËÎı¾±»¿´³ÉÊÇÎļþÕûÌåµÄÒ»²¿·Ö¡£
δÎöʵÌå(unparsed entity)ÊÇÒ»ÖÖ×ÊÔ´£¬ÆäÄÚÈÝ¿ÉÒÔÊÇÒ²¿ÉÒÔ²»ÊÇÎı¾£¬²¢ÇÒ£¬Èç¹ûÊÇÎı¾µÄ»°£¬¿ÉÒÔ²»ÊÇXML¡£Ã¿Ò»¸öδÎöʵÌåÓÐÒ»¸öÏà¹ØÁªµÄÓÃÃû×Ö±êʶµÄ¼Ç·¨¡£³ýÁËÒªÇóXML´¦ÀíÆ÷ÄÜÏòÓ¦ÓÃÌṩʵÌåºÍ¼Ç·¨µÄ±êʶ·ûÖ®Í⣬XML¶ÔδÎöʵÌåµÄÄÚÈݲ»×÷ÈκÎÏÞÖÆ¡£
ÒÑÎöʵÌåÒÔʵÌåÒýÓõķ½Ê½Ê¹ÓÃÃû×ÖÀ´µ÷ÓÃ;δÎöʵÌåÓÃENTITY
»òENTITIES
ÊôÐÔÖиø³öµÄÃû×Öµ÷Óá£
ÆÕͨʵÌå(general entity)ÊÇÄÇЩÔÚÎļþÄÚÈÝÖÐʹÓõÄʵÌå¡£ÔÚ±¾¹æ·¶ÖУ¬ÆÕͨʵÌåÓÐʱÓÃδÐÞÊεÄÊõÓïentityÀ´±íʾ¡£²ÎÊýʵÌåÊÇÓÃÓÚDTDÄÚµÄÒÑÎöʵÌå¡£ÕâÁ½ÀàʵÌåÓò»Í¬ÐÎʽµÄÒýÓã¬ÔÚ²»Í¬µÄÉÏÏÂÎÄÖÐʶ±ð¡£ÁíÍ⣬ËüÃÇʹÓò»Í¬µÄÃû×Ö¿Õ¼ä;¾ßÓÐÏàͬÃû×ֵIJÎÊýʵÌåºÍÆÕͨʵÌåÊÇÁ½¸ö½ØÈ»²»Í¬µÄÁ½¸öʵÌå¡£
Ò»¸ö×Ö·ûÒýÓÃÒýÓÃISO/IEC 10646×Ö·û¼¯ÖеÄÒ»¸ö×Ö·û¡£ÀýÈç²»ÄÜÓÃÊäÈëÉ豸ֱ½ÓÊäÈëµÄ×Ö·û¡£
×Ö·ûÒýÓÃ | ||||||||||
|
¹æ·¶ÐÔÔ¼Êø: ºÏ·¨×Ö·û
ÓÃ×Ö·ûÒýÓÃÒýÓõÄ×Ö·û±ØÐëÆ¥ÅäChar²úÉúʽ¡£
Èç¹û×Ö·ûÒýÓÃÒÔ"&#x
"¿ªÍ·£¬Ö±µ½ÖÕ½á;
µÄÊý×ÖºÍ×ÖĸÌṩÁËij×Ö·ûÔÚISO/IEC 10646ÖдúÂëµÄÒ»¸öÊ®Áù½øÖƱíʾ¡£Èç¹ûËü½öÒÔ"&#
"¿ªÍ·£¬Ö±µ½ÖÕ½á;
µÄÊý×ÖÌṩÁËij×Ö·ûµÄ´úÂëµÄÊ®½øÖµ±íʾ¡£
ʵÌåÒýÓÃ(entity reference)ÒýÓÃÒ»¸öÃüÃûʵÌåµÄÄÚÈÝ¡£¶ÔÒÑÎöÆÕͨʵÌåµÄÒýÓÃʹÓÃ"and"ºÅ(&
)ºÍ·ÖºÅ(;
)×÷Ϊ¶¨½ç·û¡£²ÎÊýʵÌåÒýÓÃÔòʹÓðٷֺÅ(%
)ºÍ·ÖºÅ(;
)×÷Ϊ¶¨½ç·û¡£
ʵÌåÒýÓà | ||||||||||||||||||||||||||||||||||||||||||||||
|
¹æ·¶ÐÔÔ¼Êø: ÉùÃ÷ʵÌå
ÔÚÒ»¸öûÓÐÈκÎDTDµÄÎļþ£¬»òÒ»¸öÖ»Óв»°üº¬²ÎÊýʵÌåÒýÓõÄÄÚ²¿DTD×Ó¼¯µÄÎļþ£¬»òÒ»¸ö"standalone='yes'
"µÄÎļþÄÚ£¬ÔÚʵÌåÒýÓÃÖиø³öµÄName
±ØÐëÓëʵÌåÉùÃ÷ÖÐËù¸ø³öµÄÏàÆ¥Å䣬µ«¹æ·¶µÄÎļþ²»ÐèÒªÉùÃ÷ÒÔϵÄÕâЩʵÌ壺amp
£¬lt
£¬gt
£¬apos
ºÍquot
¡£²ÎÊýʵÌåµÄÉùÃ÷±ØÐëÏÈÓÚÈκζÔËüµÄÒýÓá£ÀàËƵأ¬ÆÕͨʵÌåµÄÉùÃ÷±ØÐëÏÈÓÚÈκÎÔÚÊôÐÔ±íÉùÃ÷ÖеÄȱʡֵÖгöÏֵĶÔËüµÄÒýÓá£×¢Òâ¶ÔÓÚÔÚÍⲿ×Ó¼¯»òÍⲿ²ÎÊýʵÌåÖÐÉùÃ÷µÄʵÌ壬²»½øÐÐÑéÖ¤µÄ´¦ÀíÆ÷²»±ØÒª¶ÁÈ¡ºÍ´¦ÀíËüÃǵÄÉùÃ÷;¶ÔÕâЩÎļþ£¬½öµ±standalone='yes'ʱ£¬ÊµÌå±ØÐë±»ÉùÃ÷µÄ¹æÔò²ÅÊÇÒ»¸ö¹æ·¶ÐÔÔ¼Êø¡£
ÓÐЧÐÔÔ¼Êø: ÉùÃ÷ʵÌå
ÔÚÒ»¸öÓÐÍⲿ×Ó¼¯»òÍⲿ²ÎÊýʵÌåÇÒ"standalone='no'
"µÄʵÌåÖУ¬ÊµÌåÒýÓÃÖиø³öµÄName
±ØÐëÓëʵÌåÉùÃ÷ÖÐËù¸ø³öµÄÏàÆ¥Åä¡£³öÓÚ»¥²Ù×÷ÐÔ¿¼ÂÇ£¬ÓÐЧµÄÎļþÓ¦¸ÃÒÔ"4.6 Ô¤¶¨ÒåʵÌå"Öеļò»¯ÐÎʽÉùÃ÷ʵÌåamp
£¬lt
£¬gt
£¬apos
ºÍquot
¡£²ÎÊýʵÌåµÄÉùÃ÷±ØÐëÏÈÓÚÈκζÔËüµÄÒýÓá£ÀàËƵأ¬ÆÕͨʵÌåµÄÉùÃ÷±ØÐëÏÈÓÚÈκÎÔÚÊôÐÔ±íÉùÃ÷ÖеÄȱʡֵÖгöÏֵĶÔËüµÄÒýÓá£
¹æ·¶ÐÔÔ¼Êø: ÒÑÎöʵÌå
ʵÌåÒýÓò»ÄÜ°üº¬Ò»¸öδÎöʵÌåµÄÃû×Ö¡£Î´ÎöʵÌåÖ»ÄÜÔÚÉùÃ÷ΪENTITY
»òENTITIES
µÄÊôÐÔÖµÖÐÒýÓá£
¹æ·¶ÐÔÔ¼Êø: Î޵ݹé
ÒÑÎöʵÌå²»ÄÜÖ±½Ó»ò¼ä½ÓµØ°üº¬¶Ô×ÔÉíµÄµÝ¹éÒýÓá£
¹æ·¶ÐÔÔ¼Êø: ÔÚDTDÄÚ
²ÎÊýʵÌåÒýÓÃÖ»ÄÜÔÚDTDÖгöÏÖ¡£
×Ö·ûÒýÓúÍʵÌåÒýÓõÄÀý×Ó£º
Type <key>less-than</key> (<) to save options. |
²ÎÊýʵÌåÒýÓõÄÀý×Ó£º
<!-- declare the parameter entity "ISOLat2"... --> |
ʵÌåÉùÃ÷ | ||||||||||||||||||||
|
ʵÌåÒýÓÃÖеÄName
±êʶÁ˸ÃʵÌå;¶ÔÓÚδÎöʵÌ壬ENTITY
»òENTITIES
ÊôÐÔµÄÖµ±êʶÁ˸ÃʵÌå¡£Èç¹ûͬһʵÌå±»ÉùÃ÷Á˲»Ö¹Ò»´Î£¬°ó¶¨µÚÒ»¸öÓöµ½µÄÉùÃ÷¡£ÓÉÓû§Ñ¡Ôñ£¬Èç¹ûʵÌå±»¶à´ÎÉùÃ÷£¬XML´¦ÀíÆ÷¿ÉÒÔ¸ø³ö¾¯¸æ¡£
Èç¹ûʵÌ嶨ÒåÊÇÒ»¸öEntityValue
£¬±»¶¨ÒåµÄʵÌå±»³ÆΪÄÚ²¿ÊµÌå¡£ÄÚ²¿ÊµÌåûÓе¥¶ÀµÄÎïÀí´æ´¢¶ÔÏó£¬ÊµÌåµÄÄÚÈÝÔÚÉùÃ÷Öиø³ö¡£×¢Òâ³£Á¿ÊµÌåÖµÖÐһЩʵÌåºÍ×Ö·ûÒýÓõĴ¦Àí¿ÉÄÜÒªÇó²úÉúÕýÈ·µÄÖû»Îı¾£º²Î¼û"4.5 ÄÚ²¿Öû»Îı¾µÄ¹¹Ôì"¡£
ÄÚ²¿ÊµÌåÊÇÒÑÎöʵÌå¡£
ÄÚ²¿ÊµÌåÉùÃ÷µÄÀý×Ó£º
<!ENTITY Pub-Status "This is a pre-release of the |
Èç¹ûʵÌå²»ÊÇÄÚ²¿µÄ£¬ÄÇôËüÊÇÒ»¸öÍⲿʵÌ壬ÉùÃ÷ÈçÏ£º
ÍⲿʵÌåÉùÃ÷ | ||||||||||||||
|
Èç¹ûÓÐNDataDecl
£¬ÄÇôÕâÊÇÒ»¸öÆÕͨδÎöʵÌå;·ñÔòËüÊÇÒ»¸öÒÑÎöʵÌå¡£
ÓÐЧÐÔÔ¼Êø: ÉùÃ÷¼Ç·¨
Name
±ØÐëÓë¼Ç·¨µÄÃû×ÖÏàÆ¥Åä¡£
SystemLiteral
±»³ÆΪ¸ÃʵÌåµÄϵͳ±êʶ·û¡£ÕâÊÇÒ»¸öURI£¬¿ÉÒÔÓÃÓÚ´æÈ¡´ËʵÌå¡£×¢Òâ¾®ºÅ(#
)ºÍURIÖг£ÓõÄƬ¶Ï±êʶ·ûÐÎʽÉ϶øÑÔ²»ÊÇURIµÄÒ»²¿·Ö£»Èç¹ûÒ»¸öƬ¶Ï±êʶ·û×÷Ϊϵͳ±êʶ·ûµÄ²¿·Ö¸ø³ö£¬XML´¦ÀíÆ÷¿ÉÒÔ¸ø³öÒ»¸ö´íÎó¡£³ý·ÇÔÚ±¾¹æ·¶·¶Î§Ö®ÍâÁíÍâ¸ø³ö(È磬һ¸öÌØÊâDTDÖж¨ÒåµÄרÓÃXMLÔªËØÀàÐÍ£¬»òÒ»¸öÌØÊâÓ¦Óù淶Öж¨ÒåµÄ´¦ÀíÖ¸Áî)£¬Ïà¶ÔURIÖ¸Ïà¶ÔÓÚʵÌåÉùÃ÷ËùÔÚ×ÊÔ´µÄλÖá£Òò´Ë£¬Ò»¸öURI¿ÉÄÜÊÇÏà¶ÔÓÚÎļþʵÌ壬»òÏà¶ÔÓÚ°üº¬ÍⲿDTD×Ó¼¯µÄʵÌ壬»òÏà¶ÔÓÚÆäËûһЩÍⲿ²ÎÊýʵÌå¡£
XML´¦ÀíÆ÷´¦ÀíURIÖеķÇASCII×Ö·ûʱ£¬Ó¦¸Ã½«UTF-8ÖеÄ×Ö·ûÓÃÒ»¸ö»ò¶à¸ö×Ö½Ú±íʾ£¬È»ºó½«ÕâЩ×Ö·ûÓÃURIתÒå»úÖÆתÒå(¼´£¬½«Ã¿¸ö×Ö½Úת»»³É%HH£¬ÆäÖÐHHÊÇ×Ö½ÚÖµµÄÊ®Áù½øÖƼǷ¨)¡£
³ýÁËϵͳ±êʶ·ûÖ®Í⣬Íⲿ±êʶ·û»¹¿ÉÒÔ°üº¬¹«¹²±êʶ·û¡£ÊÔͼ´æȡʵÌåÄÚÈݵÄXML´¦ÀíÆ÷¿ÉÒÔÓù«¹²±êʶ·ûÊÔ×ŲúÉúÒ»¸ö¿ÉÑ¡URI¡£Èç¹û´¦ÀíÆ÷ÎÞ·¨×öµ½ÕâÒ»µã£¬Ëü±ØÐëʹÓÃϵͳ³£Á¿ÖеÄURI¡£ÔÚÊÔ×ÅÆ¥Åä֮ǰ£¬¹«¹²±êʶ·ûÖÐËùÓпհ××Ö·û´®±ØÐë±»¹æ·¶Îªµ¥¸ö¿Õ¸ñ×Ö·û(#x20)£¬Í¬Ê±±ØÐëÈ¥µôÇ°µ¼ºÍβËæ¿Õ°×¡£
ÍⲿʵÌåÉùÃ÷µÄÀý×Ó£º
<!ENTITY open-hatch |
ÿ¸öÍⲿÒÑÎöʵÌå¿ÉÒÔÒÔÎı¾ÉùÃ÷×÷Ϊ¿ªÊ¼¡£
Îı¾ÉùÃ÷ | ||||
|
Îı¾ÉùÃ÷±ØÐëÒÔ³£Á¿ÐÎʽ¸ø³ö£¬¶ø²»ÄÜʹÓÃÒÑÎöʵÌåµÄÒýÓá£Îı¾ÉùÃ÷Ö»ÄÜÔÚÍⲿÒÑÎöʵÌåµÄ¿ªÍ·³öÏÖ£¬²»ÔÊÐíÔÚÆäËûÈκεط½³öÏÖ¡£
Èç¹ûÎļþʵÌåÆ¥Åädocument
²úÉúʽ£¬ÄÇôËüÊǹ淶µÄ¡£Èç¹ûÍⲿÆÕͨÒÑÎöʵÌåÆ¥ÅäextParsedEnt
²úÉúʽ£¬ÄÇôËüÊǹ淶µÄ¡£Èç¹ûÍⲿ²ÎÊýʵÌåÆ¥ÅäextPE
²úÉúʽ£¬ÄÇôËüÊǹ淶µÄ¡£
¹æ·¶µÄÍⲿÒÑÎöʵÌå | ||||||||
|
Èç¹ûÄÚ²¿ÆÕͨÒÑÎöʵÌåµÄÖû»Îı¾Æ¥Åäcontent
²úÉúʽ£¬ÄÇôËüÊǹ淶µÄ¡£¸ù¾Ý¶¨Ò壬ËùÓÐÄÚ²¿µÄ²ÎÊýʵÌ嶼Êǹ淶µÄ¡£
ʵÌå·ûºÏ¹æ·¶ÐÔµÄÒ»¸ö½á¹ûÊÇXMLÎļþµÄÂß¼ºÍÎïÀí½á¹¹ÊÇÑϸñǶÌ×µÄ;Æðʼ±êÇ©£¬½áÊø±êÇ©£¬¿ÕÔªËرêÇ©£¬ÔªËØ£¬×¢ÊÍ£¬´¦ÀíÖ¸Á×Ö·ûÒýÓ㬻òʵÌåÒýÓö¼²»ÄÜÔÚÒ»¸öʵÌåÖпªÊ¼¶øÔÚÁíÒ»¸öʵÌåÖнáÊø¡£
XMLÎļþÖеÄÿ¸öÍⲿÒÑÎöʵÌ嶼¿ÉÒÔ¶ÔÆä×Ö·û²ÉÓÃÒ»ÖÖ²»Í¬µÄ±àÂë·½°¸¡£ËùÓÐXML´¦ÀíÆ÷±ØÐëÄܶÁ±àÂëΪUTF-8»òUTF-16µÄʵÌå¡£
ÒÔUTF-16±àÂëµÄʵÌå±ØÐëÒÔISO/IEC 10646Ôö²¹EºÍUnicode¸½Â¼B(Áã¿í¶È²»¼ä¶Ï¿Õ¸ñ×Ö·û£¬#xFEFF)ÖÐËùÃèÊöµÄ×Ö½Ú´ÎÐò±ê¼Ç(Byte Order Mark)¿ªÍ·¡£ÕâÊÇÒ»¸ö±àÂëÇ©Ãû£¬¼´²»ÊÇXMLÎļþÖбê¼ÇµÄÒ»²¿·Ö£¬Ò²²»ÊÇXMLÎļþ×Ö·ûÊý¾ÝµÄÒ»²¿·Ö¡£XML´¦ÀíÆ÷±ØÐëÄÜÓôË×Ö·ûÇø·ÖUTF-8±àÂëºÍUTF-16±àÂëµÄÎļþ¡£
ËäÈ»XML´¦ÀíÆ÷Ö»±»ÒªÇóÄܶÁÈ¡UTF-8ºÍUTF-16±àÂëµÄʵÌ壬ÒÑÓй²Ê¶ÈÏΪÊÀ½çÉÏ»¹ÓÐÆäËûµÄ±àÂë·½°¸¡£ÓÐʱ¿ÉÄÜÏëÈÃXML´¦ÀíÆ÷¶ÁÈ¡ÒÔÄÇЩ±àÂë·½°¸±àÂëµÄʵÌå¡£ÒÔ²»Í¬ÓëUTF-8ºÍUTF-16µÄ±àÂë·½°¸´æ´¢µÄʵÌå±ØÐëÒÔ°üº¬±àÂëÉùÃ÷µÄÎı¾ÉùÃ÷¿ªÍ·£º
±àÂëÉùÃ÷ | ||||||||||
|
ÔÚÎļþʵÌåÖУ¬±àÂëÉùÃ÷ÊÇXMLÉùÃ÷µÄÒ»²¿·Ö¡£EncName
ÊÇËùÓñàÂë·½°¸µÄÃû×Ö¡£
ÔÚÒ»¸ö±àÂëÉùÃ÷ÖУ¬Öµ"UTF-8
"£¬"UTF-16
"£¬"ISO-10646-UCS-2
"ºÍ"ISO-10646-UCS-4
"Ó¦¸ÃÓÃÓÚ±íʾUnicode»òISO/IEC 10646Öеĸ÷ÖÖ²»Í¬±àÂëºÍ±ä»»·½°¸£¬Öµ"ISO-8859-1
"£¬"ISO-8859-2
"£¬... "ISO-8859-9
"Ó¦¸ÃÓÃÓÚ±íʾISO 8859µÄ¸÷¸ö²¿·Ö£¬¶øÖµ"ISO-2022-JP
"£¬"Shift_JIS
"ºÍ"EUC-JP
"Ó¦¸ÃÓÃÓÚ±íʾJIS X-0208-1997µÄ¸÷ÖÖ±àÂë¡£XML´¦ÀíÆ÷¿ÉÒÔʶ±ðÆäËû±àÂë·½°¸;½¨Òé¶ÔÓÚÔÚInternet Assigned Numbers Authority [IANA]×¢²áµÄ×Ö·û±àÂë·½°¸(ÒÔ×Ö·û¼¯(charset)µÄ·½Ê½)£¬³ýÁËÒÔÉÏËùÁеÄÖ®Í⣬ÒýÓÃʱӦʹÓÃÆä×¢²áÃû¡£×¢ÒâÕâЩע²áÃû¶¨ÒåΪ´óСдÃô¸Ð£¬Òò´ËÓûÓë֮ƥÅäµÄ´¦ÀíÆ÷ÒªÒÔ´óСдÃô¸ÐµÄ·½Ê½½øÐÐÆ¥Åä¡£
ÔÚȱÉÙÍⲿ´«ÊäÐÒé(ÈçHTTP»òMIME)ËùÌṩµÄÐÅϢʱ£¬ÒÔÏÂÇé¿ö¾ùÊÇ´íÎó£ºXML´¦ÀíÆ÷½ÓÊÕµ½µÄʵÌåµÄ±àÂë·½°¸ÓëʵÌåËùº¬±àÂëÉùÃ÷ÖÐÖ¸³öµÄ±àÂë·½°¸²»Í¬£¬±àÂëÉùÃ÷²»ÔÚÍⲿʵÌåµÄ¿ªÍ·£¬¼È²»ÒÔ×Ö½Ú´ÎÐò±ê¼Ç¿ªÍ·Ò²²»ÒÔ±àÂëÉùÃ÷¿ªÍ·µÄʵÌåʹÓÃÁ˲»Í¬ÓÚUTF-8µÄ±àÂë¡£×¢ÒâÒòΪASCIIÊÇUTF-8µÄÒ»¸ö×Ó¼¯£¬Ñϸñ˵À´ÆÕͨASCII×Ö·û²»ÐèÒª±àÂëÉùÃ÷¡£
µ±XML´¦ÀíÓöµ½µÄʵÌåʹÓÃÁËËü²»ÄÜ´¦ÀíµÄ±àÂëʱ£¬ÊÇÒ»¸öÑÏÖØ´íÎó¡£
±àÂëÉùÃ÷µÄÀý×Ó£º
<?xml encoding='UTF-8'?> |
ϱí»ã×ÜÁË×Ö·ûÒýÓã¬ÊµÌåÒýÓ㬠ºÍ¶ÔδÎöʵÌåµÄµ÷ÓÿÉÒÔ³öÏÖµÄÉÏÏÂÎÄ£¬ÒÔ¼°Ã¿ÖÖÇé¿öÏÂXML´¦ÀíÆ÷µÄ¶¯×÷¡£ ×î×ó±ßÒ»ÁеıêÇ©Ö¸Ã÷ÁËʶ±ðʱµÄÉÏÏÂÎÄ£º
content
¡£AttValue
¡£Name
¶ø²»ÊÇÒÔÒýÓõÄÐÎʽ³öÏÖ£¬×÷ΪÉùÃ÷ΪENTITY
ÀàÐ͵ÄÊôÐÔµÄÖµ£¬»ò¿ÉÒÔ×÷ΪÉùÃ÷ΪENTITIES
ÀàÐ͵ÄÊôÐÔÖµÖеÄÒÔ¿Õ°×·Ö¸ôµÄ¼ÇºÅÖ®Ò»¡£EntityValue
¡£EntityValue
ºÍAttValue
Ö®Íâ¡£¡¡ | ʵÌåÀàÐÍ | ×Ö·û | |||
²ÎÊý | ÄÚ²¿ÆÕͨ | ÍⲿÒÑÎöÆÕͨ | δÎö | ||
ÄÚÈÝÖеÄÒýÓà | ²»±»Ê¶±ð | ±»°üº¬ | ½øÐÐÑé֤ʱ±»°üº¬ | ±»½ûÖ¹ | ±»°üº¬ |
ÊôÐÔÖµÖеÄÒýÓà | ²»±»Ê¶±ð | ×÷Ϊ³£Á¿±»°üº¬ | ±»½ûÖ¹ | ±»½ûÖ¹ | ±»°üº¬ |
×÷ΪÊôÐÔÖµ | ²»±»Ê¶±ð | ±»½ûÖ¹ | ±»½ûÖ¹ | ֪ͨ | ²»±»Ê¶±ð |
ʵÌåÖµÖеÄÒýÓà | ×÷Ϊ³£Á¿±»°üº¬ | ²»´¦Àí | ²»´¦Àí | ±»½ûÖ¹ | ±»°üº¬ |
DTDÖеÄÒýÓà | ×÷ΪPE±»°üº¬ | ±»½ûÖ¹ | ±»½ûÖ¹ | ±»½ûÖ¹ | ±»½ûÖ¹ |
ÔÚDTDÖ®Í⣬°Ù·ÖºÅ×Ö·û%
ûÓÐÌØÊ⺬Òå;Òò´ËÔÚDTDÖеIJÎÊýʵÌåÒýÓÃÔÚcontent
Öв»±»µ±³É±ê¼Çʶ±ð¡£ÀàËƵأ¬³ý·ÇδÎöʵÌåµÄÃû×Ö³öÏÖÔÚÒÑÊʵ±ÉùÃ÷µÄÊôÐÔµÄÖµÖУ¬·ñÔòËüÃDz»±»Ê¶±ð¡£
µ±Ò»¸öʵÌåµÄÖû»Îı¾±»µ±³É³öÏÖÔÚÒýÓÃËùÔÚλÖõÄÎļþµÄÒ»²¿·ÖÒ»Ñù±»´æÈ¡ºÍ´¦Àíʱ£¬³Æ´ËʵÌå±»°üº¬¡£ÆäÖû»Îı¾¿ÉÒÔ°üº¬×Ö·ûÊý¾ÝºÍ±ê¼Ç(²»°üÀ¨²ÎÊýʵÌå)£¬ÆäÖбê¼Ç±ØÐëÒÔͨ³£µÄ·½Ê½Ê¶±ð£¬µ«ÓÃÓÚתÒå±ê¼Ç¶¨½ç·û(ʵÌåamp
£¬lt
£¬gt
£¬apos
ºÍquot
)µÄʵÌåµÄÖû»Îı¾×ÜÊDZ»µ±³ÉÊý¾Ý¡£(×Ö·û´®"AT&T;
"Õ¹¿ªÎª"AT&T;
"ÉдæµÄ"and"ºÅ&²»±»Ê¶±ðΪʵÌåÒýÓõĶ¨½ç·û¡£)µ±±»±íʾµÄ×Ö·û±»µ±³É³öÏÖÔÚÒýÓÃËùÔÚλÖÃÒ»Ñù±»´¦Àíʱ£¬³Æ´Ë×Ö·ûÒýÓñ»°üº¬¡£
µ±XML´¦ÀíÆ÷ʶ±ð³öÒ»¸ö¶ÔÒÑÎöʵÌåµÄÒýÓã¬ÎªÁËÑéÖ¤¸ÃÎļþ£¬´¦ÀíÆ÷±ØÐë°üº¬´ËʵÌåµÄÖû»Îı¾¡£Èç¹ûʵÌåÊÇÍⲿµÄ£¬¶ø´¦ÀíÆ÷²»ÊÔͼÑéÖ¤¸ÃXMLÎļþ£¬ÄÇô´¦ÀíÆ÷¿ÉÒÔ£¬µ«²»ÊDZØÐ룬°üº¬´ËʵÌåµÄÖû»Îı¾¡£Èç¹ûÒ»¸ö²»ÑéÖ¤µÄÓï·¨·ÖÎöÆ÷²»°üº¬´ËÖû»Îı¾£¬Ëü±ØÐë֪ͨӦÓÃËüʶ±ð³öµ«Ã»ÓжÁÈ¡´ËʵÌå¡£
ÕâÌõ¹æ·¶»ùÓÚÕâÑùÒ»¸ö¹²Ê¶£ºÓÉSGMLºÍXMLµÄʵÌå»úÖÆÌṩµÄÆð³õÉè¼ÆÓÃÓÚÖ§³ÖÄ£¿é»¯´´×÷µÄ×Ô¶¯°üº¬²»Ò»¶¨ÊʺÏÓÚÆäËûÓ¦Óã¬ÓÈÆäÊÇÎļþä¯ÀÀ¡£ÀýÈ磬µ±ä¯ÀÀÆ÷Óöµ½Ò»¸öÍⲿÒÑÎöʵÌåÒýÓÃʱ£¬¿ÉÄÜÑ¡ÔñÓÿÉÊÓ·½Ê½±íʾÆä´æÔÚµ«Ö»ÔÚ±»ÇëÇóʱ²Å¶ÁÈ¡Ëü½øÐÐÏÔʾ¡£
ÒÔÏÂÇé¿ö±»½ûÖ¹£¬²¢¹¹³ÉÒ»¸öÑÏÖØ´íÎó£º
EntityValue
»òAttValue
ÖС£µ±ÊµÌåÒýÓóöÏÖÔÚÊôÐÔÖµÖлò²ÎÊýʵÌåÒýÓóöÏÖÔÚ³£Á¿ÊµÌåÖµÖÐʱ£¬ËüÃǵÄÖû»Îı¾±»µ±³É³öÏÖÔÚÒýÓÃËùÔÚλÖõÄÎļþµÄÒ»²¿·ÖÒ»Ñù±»´æÈ¡ºÍ´¦Àí£¬Öû»Îı¾Öеĵ¥Ë«ÒýºÅ×ÜÊDZ»µ±³ÉÕý³£µÄÊý¾Ý×Ö·û¶ø²»»á½áÊø´Ë³£Á¿¡£ÀýÈ磬ÏÂÃæµÄÀý×ÓÊǹ淶µÄ£º
<!ENTITY % YN '"Yes"' > |
¶øÕâ¸öÀý×Ó²»ÊÇ£º
<!ENTITY EndAttr "27'" > |
µ±Î´ÎöʵÌåÃû×Ö×÷Ϊ¼ÇºÅÔÚÉùÃ÷ΪENTITY
»òENTITIES
ÀàÐ͵ÄÊôÐÔµÄÖµÖгöÏÖʱ£¬
½øÐÐÑéÖ¤µÄ´¦ÀíÆ÷±ØÐ뽫´ËʵÌåºÍËüµÄÏà¹Ø¼Ç·¨µÄϵͳºÍ¹«¹²(Èç¹ûÓеĻ°)±êʶ·û֪ͨ¸øÓ¦Óá£
µ±ÊµÌåÉùÃ÷ÄÚÒ»¸öÆÕͨʵÌåÒýÓóöÏÖÔÚEntityValue
ÖÐʱ£¬
Ëü²»±»´¦Àí£¬±£³Ö²»±ä¡£
ºÍÍⲿÒÑÎöʵÌåÒ»Ñù£¬²ÎÊýʵÌåÖ»ÐèÔÚ½øÐÐÑé֤ʱ±»°üº¬¡£µ±²ÎÊýʵÌåÒýÓÃÔÚDTDÖб»Ê¶±ð²¢±»°üº¬Ê±£¬ËüµÄÖû»Îı¾±»Ç°ºó¸÷¼ÓÉÏÒ»¸ö¿Õ¸ñ×Ö·û;ÆäÄ¿µÄÔÚÓÚÇ¿ÖƲÎÊýʵÌåµÄÖû»Îı¾°üº¬ÕûÊý¸öDTDÖеÄÓï·¨¼ÇºÅ¡£
ÔÚÌÖÂÛÄÚ²¿ÊµÌåµÄ´¦Àíʱ£¬Çø·ÖÁ½ÖÖÐÎʽµÄʵÌåÖµÊÇÓаïÖúµÄ¡£³£Á¿ÊµÌåÖµ(literal entity value)ÊÇʵ¼Ê³öÏÖÔÚʵÌåÉùÃ÷ÖÐÓÃÒýºÅÀ©ÆðµÄ×Ö·û´®¡£¶ÔÓ¦ÓÚ·ÇÖÕ½á·ûEntityValue
¡£Öû»Îı¾(replacement text)ÊÇÖû»ÁË×Ö·ûÒýÓúͲÎÊýʵÌåÒýÓúóµÄʵÌåÄÚÈÝ¡£
ÔÚÄÚ²¿ÊµÌåÉùÃ÷(EntityValue
)Öиø³öµÄ³£Á¿ÊµÌåÖµ¿ÉÒÔ°üÀ¨×Ö·ûÒýÓ㬲ÎÊýʵÌåÒýÓúÍÆÕͨʵÌåÒýÓá£ÕâЩÒýÓñØÐë±»Õû¸ö°üº¬ÓÚ³£Á¿ÊµÌåÖµÖС£ÈçÇ°Êö·½Ê½±»°üº¬µÄʵ¼ÊÖû»Îı¾±ØÐë°üº¬ËùÓб»ÒýÓõIJÎÊýʵÌåµÄÖû»Îı¾£¬Í¬Ê±ËùÓб»ÒýÓõÄ×Ö·û±ØÐëÔÚ³£Á¿ÊµÌåÖµÖÐ×Ö·ûÒýÓÃËùÔÚλÖñ»°üº¬¡£µ«ÆÕͨʵÌåµÄÒýÓñØÐë±£³Ö²»±ä£¬²»±»Õ¹¿ª¡£ÀýÈ磬Èç¹ûÓÐÒÔϵÄÉùÃ÷£º
<!ENTITY % pub "Éditions Gallimard" > |
ÄÇôʵÌå"book
"µÄÖû»Îı¾Îª£º
La Peste: Albert Camus, |
Ò»µ©ÒýÓÃ"&book;
"³öÏÖÔÚÎļþµÄÄÚÈÝ»òÊôÐÔÖµÖÐʱ£¬ÆÕͨʵÌåÒýÓÃ"&rights;
"Ó¦¸Ã±»Õ¹¿ª¡£
ÕâЩ¼òµ¥µÄ¹æÔò½«¿ÉÄÜ»áÓи´ÔÓµÄÏ໥×÷ÓÃ;²Î¼û"D. ʵÌåºÍ×Ö·ûÒýÓõÄÕ¹¿ª"ÖжÔÒ»¸öÄѵÄÀý×ÓµÄÏêϸÌÖÂÛ¡£
ʵÌåºÍ×Ö·ûÒýÓö¼¿ÉÒÔÓÃÓÚתÒå×ó¼âÀ¨ºÅ£¬"and"ºÅ(&)ºÍÆäËû¶¨½ç·û¡£ÆÕͨʵÌ弯ºÏ(amp
£¬lt
£¬gt
£¬apos
£¬quot
)רÃÅÓÃÓÚ´ËÄ¿µÄ¡£Ò²¿ÉÒÔʹÓÃÊýÖµ×Ö·ûÒýÓÃ; Ò»µ©±»Ê¶±ð£¬ËüÃÇÁ¢¼´±»Õ¹¿ª£¬Í¬Ê±ËüÃDZØÐë±»µ±³É×Ö·ûÊý¾Ý£¬Òò´ËÊýÖµ×Ö·ûÒýÓÃ"<
"ºÍ"&
"¿ÉÒÔÓÃÓÚתÒå³öÏÖÔÚ×Ö·ûÊý¾ÝÖеÄ<
ºÍ&
¡£
²»¹ÜÕâЩʵÌåÊÇ·ñ±»ÉùÃ÷£¬ËùÓеÄXML´¦ÀíÆ÷±ØÐëÄÜʶ±ðËüÃÇ¡£³öÓÚ»¥²Ù×÷ÐÔ¿¼ÂÇ£¬ÓÐЧµÄXMLÎļþÓ¦¸ÃÈçÆäËûʵÌåÒ»Ñù£¬ÔÚʹÓÃÕâЩʵÌåÇ°ÏÈÉùÃ÷ËüÃÇ¡£Èç¹ûÉùÃ÷µÄ»°£¬ÕâЩʵÌå±ØÐë±»ÉùÃ÷ΪÄÚ²¿ÊµÌ壬ÆäÖû»Îı¾ÊDZ»×ªÒåµÄµ¥¸ö×Ö·û»òÖ¸ÏòÕâ¸ö×Ö·ûµÄ×Ö·ûÒýÓá£ÈçÏÂËùʾ¡£
<!ENTITY lt "&#60;"> |
×¢ÒâÔÚ"lt
"ºÍ"amp
"µÄÉùÃ÷ÖУ¬<
ºÍ&
±»Á½´ÎתÒ壬ÕâÊÇΪÁËÂú×ãʵÌåÖû»µÄ¹æ·¶ÐÔÒªÇó¡£
¼Ç·¨ÓÃÃû×Ö±êʶÁËδÎöʵÌåµÄ¸ñʽ£¬¾ßÓмǷ¨ÊôÐÔµÄÔªËصĸñʽÒÔ¼°´¦ÀíÖ¸ÁîËùÕë¶ÔµÄÓ¦Óõĸñʽ¡£
¼Ç·¨ÉùÃ÷¸³Óè¼Ç·¨Ò»¸öÃû×ÖÓÃÓÚʵÌåÖУ¬ÊôÐÔ±íÉùÃ÷ÖкÍÊôÐÔֵ˵Ã÷ÖУ¬Í¬Ê±Ò²¸ø³öÁËÒ»¸ö¼Ç·¨µÄÍⲿ±êʶ·ûʹµÃXML´¦ÀíÆ÷»òËüµÄ¿Í»§Ó¦ÓÿÉÒÔ¶¨Î»ÄÜÒÔ¸ø¶¨¼Ç·¨µÄ¸ñʽ´¦ÀíÊý¾ÝµÄÖúÀíÓ¦Óá£
¼Ç·¨ÉùÃ÷ | ||||||||
|
XML´¦ÀíÆ÷±ØÐëÏòÓ¦ÓÃÌṩÈκÎÔÚÊôÐÔÖµÖУ¬ÊôÐÔ¶¨ÒåÖлòʵÌåÉùÃ÷Öж¨Òå»òÒýÓõļǷ¨µÄÃû×ÖºÍÍⲿ±êʶ·û¡£ËüÃÇ»¹¿ÉÒÔ½«Íⲿ±êʶ·û½âÎö³Éϵͳ±êʶ·û£¬ÎļþÃû£¬»òÊÇÓ¦Óõ÷ÓÃÏàÓ¦´¦ÀíÆ÷´¦Àí¸ø¶¨¼Ç·¨¸ñʽµÄÊý¾ÝµÄËùÐèµÄÆäËûÐÅÏ¢¡£(µ«Èç¹ûXML´¦ÀíÆ÷»òÓ¦ÓÃËùÔËÐеÄϵͳÖÐûÓд¦ÀíXMLÎļþÉùÃ÷ºÍÒýÓõļǷ¨µÄÏàÓ¦Ó¦ÓõÄÇé¿ö£¬²»ÊÇÒ»¸ö´íÎó¡£)
ÎļþʵÌå(document entity)ÊÇʵÌåÊ÷µÄ¸ùºÍXML´¦ÀíÆ÷µÄ´¦ÀíÆðµã¡£±¾¹æ·¶Ã»Óй涨XMLÈçºÎ¶¨Î»ÎļþʵÌå;ÓëÆäËûʵÌ岻ͬ£¬ÎļþʵÌåûÓÐÃû×Ö£¬¶øÇÒ¿ÉÒÔÍêÈ«²»´øÈκαêʶµØ³öÏÖÔÚ´¦ÀíÆ÷µÄÊäÈëÁ÷ÖС£
ºÏºõ¹æ·¶µÄXML´¦ÀíÆ÷¿ÉÒÔ·ÖΪÁ½Àࣺ½øÐÐÑéÖ¤µÄºÍ²»½øÐÐÑéÖ¤µÄ¡£
½øÐÐÑéÖ¤ºÍ²»½øÐÐÑéÖ¤µÄ´¦ÀíÆ÷¶¼±ØÐ뱨¸æÔÚÎļþʵÌåµÄÄÚÈÝÖкÍÈκÎÆäËûËüÃǶÁµ½µÄÒÑÎöʵÌåÖжԹ淶ÐÔÔ¼ÊøµÄÎ¥·´¡£
½øÐÐÑéÖ¤µÄ´¦ÀíÆ÷±ØÐ뱨¸æÎ¥·´DTDÉùÃ÷ÖÐËùÊöÔ¼ÊøµÄÇé¿öÒÔ¼°²»Âú×ã±¾¹æ·¶Öиø³öµÄÓÐЧÐÔÔ¼ÊøµÄÇé¿ö¡£ ÒªÍê³ÉÕâÒ»µã£¬½øÐÐÑéÖ¤µÄXML´¦ÀíÆ÷±ØÐë¶ÁÈ¡ºÍ´¦ÀíÕû¸öDTDºÍËùÓÐÔÚÎļþÖÐÒýÓõÄÍⲿÒÑÎöʵÌå¡£
²»½øÐÐÑéÖ¤µÄ´¦ÀíÆ÷Ö»±»ÒªÇó¼ì²éÎļþʵÌåºÍÕû¸öÄÚ²¿DTD×Ó¼¯µÄ¹æ·¶ÐÔ¡£ËäÈ»ËüÃDz»±»ÒªÇó¼ì²éÎļþµÄÓÐЧÐÔ£¬µ«ËüÃDZØÐë´¦ÀíËüÃǶÁÈ¡µÄËùÓÐÄÚ²¿DTD×Ó¼¯ÖеÄÉùÃ÷ºÍËùÓвÎÊýʵÌ壬ֱµ½Óöµ½µÚÒ»¸ö¶ÔËüÃÇûÓжÁÈ¡µÄ²ÎÊýʵÌåµÄÒýÓÃ;Ò²¾ÍÊÇ˵£¬ËüÃDZØÐë¸ù¾ÝÕâЩÉùÃ÷ÖеÄÐÅÏ¢¹æ·¶»¯ÊôÐÔÖµ£¬°üº¬ÄÚ²¿ÊµÌåµÄÖû»Îı¾£¬²¢ÌṩȱʡÊôÐÔÖµ¡£ËüÃÇÔÚÓöµ½µÚÒ»¸ö¶ÔËüÃÇûÓжÁÈ¡µÄ²ÎÊýʵÌåµÄÒýÓú󣬲»Ó¦´¦ÀíÆäºóµÄʵÌåÉùÃ÷»òÊôÐÔ±íÉùÃ÷£¬ÒòΪ´ËʵÌåÖаüº¬µÄÉùÃ÷¿ÉÄܸ²¸ÇÇ°ÃæµÄÉùÃ÷¡£
½øÐÐÑéÖ¤µÄ´¦ÀíÆ÷µÄÐÐΪÊǸ߶ȿÉÔ¤²âµÄ;Ëü±ØÐë¶ÁÈ¡ÎļþµÄËùÓв¿·Ö£¬±¨¸æËùÓжԹ淶ÐÔºÍÓÐЧÐÔµÄÎ¥·´¡£¶ÔÒ»¸ö²»½øÐÐÑéÖ¤µÄ´¦ÀíÆ÷µÄÒªÇóÒªµÍÒ»µã;Ëü²»ÐèÒª¶ÁÈ¡ÎļþʵÌåÒÔÍâµÄÈκÎÎļþ²¿·Ö¡£Õâ¶ÔXMLµÄ´¦ÀíÆ÷µÄÓû§¶øÑÔ¿ÉÄÜ»áÓÐÁ½¸öÖØÒªµÄÓ°Ï죺
ΪÁËʹ²»Í¬XML´¦ÀíÆ÷¼äµÄ»¥²Ù×÷ÓÐ×î´óµÄ¿É¿¿ÐÔ£¬ ʹÓò»½øÐÐÑéÖ¤µÄ´¦ÀíÆ÷µÄÓ¦Óò»Ó¦ÒÀÀµÓÚ²»ÒªÇóÕâЩ´¦ÀíÆ÷¾ß±¸µÄ¶¯×÷¡£ ÄÇЩҪÇóʹÓÃÈçȱʡֵ»òÔÚÍⲿʵÌåÖÐÉùÃ÷ÄÚ²¿ÊµÌåµÈ¹¦ÄܵÄÓ¦ÓÃÓ¦¸ÃʹÓýøÐÐÑéÖ¤µÄXML´¦ÀíÆ÷¡£
±¾¹æ·¶ÖÐXMLµÄÐÎʽ»¯ÎÄ·¨ÓÃÒ»ÖÖ¼òµ¥µÄÀ©Õ¹°Í¿Æ˹·¶Ê½(Extended Backus-Naur Form£¬EBNF)¸ø³ö¡£ÎÄ·¨ÖеÄÿһÌõ¹æÔò¶¨ÒåÁËÒ»¸ö·ûºÅ£¬ÐÎʽÈçÏ£º
symbol ::= expression |
Èç¹û·ûºÅÓÃÕýÔò±í´ïʽ¶¨Ò壬ÔòËüÒÔ´óд×Öĸ¿ªÍ·£¬ ·ñÔòÒÔСд×Öĸ¿ªÍ·¡£×Ö·û´®³£Á¿(literal strings)ÓÃÒýºÅÀ¨Æð¡£
ÔÚ¹æÔòÓұߵıí´ïʽÖУ¬ÒÔϱí´ïʽÓÃÓÚÆ¥ÅäÒ»¸ö»ò¶à¸ö×Ö·ûµÄ×Ö·û´®£º
#xN
N
ÊÇÒ»¸öÊ®Áù½øÖƵÄÕûÊý£¬µ±ISO/IEC 10646ÖÐij¸ö×Ö·ûµÄ¹æ·¶(UCS-4)´úÂëÖµ×÷ΪÎÞ·ûºÅ¶þ½øÖÆÊýÓëN
ÏàµÈʱ£¬´Ë±í´ïʽƥÅäÕâ¸ö×Ö·û¡£#xN
ÖеÄÇ°µ¼0ûÓÐÒâÒ壬ÔÚÏàÓ¦µÄ´úÂëÖµÖеÄÇ°µ¼0µÄ¸öÊýÔòÓÉËùÓÃ×Ö·û±àÂë·½°¸¾ö¶¨£¬¶ÔXMLûÓÐÒâÒå¡£[a-zA-Z]
£¬ [#xN-#xN]
[^a-z]
£¬ [^#xN-#xN]
[^abc]
£¬ [^#xN#xN#xN]
"string"
'string'
ÕâЩ·ûºÅ¿ÉÒÔ°´ÏÂÁз½Ê½×éºÏ£¬ÒÔÆ¥Åä¸ü¸´ÔÓµÄģʽ£¬ÆäÖÐA
ºÍB
±íʾ¼òµ¥±í´ïʽ£º
expression
)expression
±»µ±³ÉÒ»¸öµ¥Ôª£¬¿ÉÒÔÏò±¾±íÃèÊöµÄÄÇÑù½øÐÐ×éºÏ¡£A?
A
ÏàÆ¥Å䣬¼´A
¿ÉÑ¡¡£A B
A
ºó¸úB
µÄģʽÏàÆ¥Åä¡£A | B
A
BÖ®Ò»ÏàÆ¥Å䣬µ«²»Í¬Ê±Æ¥Åä¡£A - B
A
µ«²»Æ¥ÅäB
µÄ×Ö·û´®ÏàÆ¥Åä¡£A+
A
ÏàÆ¥Åä¡£A*
A
ÏàÆ¥Åä¡£ÆäËûÔÚ²úÉúʽÖÐʹÓõļǷ¨ÓУº
/* ... */
[ wfc: ... ]
[ vc: ... ]
¸ù¾ÝUnicode±ê×¼Öж¨ÒåµÄÌØÕ÷£¬×Ö·û±»·ÖΪ»ù×Ö·û(ÆäÖаüÀ¨Ã»ÓбäÒô·ûµÄÀ¶¡×Öĸ)£¬±íÒâ×Ö·ûºÍ×éºÏ×Ö·û(ÆäÖаüÀ¨´ó¶àÊýµÄ±äÒô·û);ÕâЩÀàºÏÆðÀ´×é³ÉÁË×ÖĸÀà¡£Êý×ÖºÍÀ©Õ¹·û(extender)Ò²¸÷×Ô±»·Ö³ÉÀà¡£
×Ö·û | ||||||||||||||||||||||||
|
Ôڴ˶¨ÒåµÄ×Ö·ûÀà¿ÉÒÔ´ÓUnicode×Ö·û¿âÖÐÈçϵ¼³ö£º
XML±»Éè¼ÆΪSGMLµÄÒ»¸ö×Ó¼¯£¬±íÏÖÔÚÿһ¸öÓÐЧµÄXMLÎļþÓ¦¸ÃÒ²ÊÇÒ»¸öºÏºõ¹æ·¶µÄSGMLÎļþ¡£¶ÔXMLÔÚSGMLÖ®Íâ¶ÔÎļþËù¼ÓµÄÏÞÖƵÄÏêϸÌÖÂ۲μû[Clark]¡£
±¾¸½Â¼ÖоÙÀý˵Ã÷ÁËÔÚ "4.4 XML´¦ÀíÆ÷¶ÔʵÌåºÍÒýÓõĴ¦Àí"Ò»½ÚÖй涨µÄʵÌåºÍ×Ö·ûÒýÓõÄʶ±ðºÍÕ¹¿ªµÄ´ÎÐò¡£
Èç¹ûÉùÃ÷°üº¬ÔÚDTDÖÐ
<!ENTITY example "<p>An ampersand (&#38;) may be escaped |
ÄÇôXML´¦ÀíÆ÷½«ÔÚ¶ÔʵÌåÉùÃ÷½øÐÐÓï·¨·ÖÎöʱʶ±ð³ö×Ö·ûÒýÓ㬲¢ÔÚ½«ÏÂÃæµÄ×Ö·û´®´æΪʵÌå"example
"µÄֵǰ½âÎöÕâЩ×Ö·ûÒýÓÃ:
<p>An ampersand (&) may be escaped |
ÎļþÖжÔ"&example;
"µÄÒýÓûᵼÖ¶ÔÎı¾µÄÖØзÖÎö£¬´ËʱԪËØ"p
"µÄÆðʼºÍ½áÊø±êÇ©±»Ê¶±ð£¬Èý¸öÒýÓñ»Ê¶±ðºÍÕ¹¿ª£¬Æä½á¹ûÊÇÒ»¸ö°üº¬ÏÂÃæÄÚÈÝ(ËùÓÐÊý¾Ý£¬ÎÞ¶¨½ç·û»ò±ê¼Ç)"p
"ÔªËØ£º
An ampersand (&) may be escaped |
Ò»¸ö¸ü¸´ÔÓµÄÀý×Ó¿ÉÒÔÍêÕûµØ˵Ã÷ÕâЩ¹æÔòºÍËüÃǵÄ×÷Óá£ÔÚÏÂÃæµÄÀý×ÓÖУ¬ÐкŽö½öÊÇΪÁË·½±ã˵Ã÷¡£
1 <?xml version='1.0'?> |
Õâ¸öÀý×ӻᵼÖÂÏÂÁж¯×÷£º
xx
"ÒÔÖµ"%zz;
"´æÓÚ·ûºÅ±íÖС£ÒòΪÖû»Îı¾²»±»ÔÙ´ÎɨÃ裬¶Ô²ÎÊýʵÌå"zz
"µÄÒýÓò»»á±»Ê¶±ð¡£(¶øÇÒÈç¹ûËü±»Ê¶±ðµÄ»°ÔòÊÇÒ»¸ö´íÎó£¬ÒòΪ"zz
"»¹Ã»Óб»ÉùÃ÷¡£)<
"±»Á¢¼´Õ¹¿ª£¬¶ø²ÎÊýʵÌå"zz
"ÒÔÖû»Îı¾"<!ENTITY tricky "error-prone" >
"±»´æ´¢£¬´ËÖû»Îı¾ÊÇÒ»¸ö¹æ·¶µÄʵÌåÉùÃ÷¡£xx
"µÄÒýÓñ»Ê¶±ð£¬"xx
"µÄÖû»Îı¾(¼´"%zz;
")±»·ÖÎö¡£¶Ô"zz
"µÄÒýÓÃËæºó±»Ê¶±ð£¬ËüµÄÖû»Îı¾("<!ENTITY tricky "error-prone" >
")±»·ÖÎö¡£´ËʱÆÕͨʵÌå"tricky
"±»ÉùÃ÷£¬ËüµÄÖû»Îı¾ÊÇ"error-prone
"¡£tricky
"µÄÒýÓñ»Ê¶±ð£¬²¢±»Õ¹¿ª£¬Òò´Ë"test
"ÔªËصÄÈ«²¿ÄÚÈÝΪһ¸ö×Ô˵Ã÷µÄ(Ò²²»ºÏÓï·¨)×Ö·û´®This sample shows a error-prone method.¡£³öÓÚ¼æÈÝÐÔ¿¼ÂÇ£¬ÒªÇóÔªËØÀàÐÍÉùÃ÷ÖеÄÄÚÈÝÄ£ÐÍÊÇÈ·¶¨Ð͵ġ£
SGMLÒªÇóÄÚÈÝÄ£ÐÍÊÇÈ·¶¨Ð͵Ä(Ëü³ÆΪ"ÎÞÆçÒåµÄ"); ÓÃSGMLϵͳÉú³ÉµÄXML´¦ÀíÆ÷¿ÉÄÜ»á°Ñ·ÇÈ·¶¨ÐÍÄÚÈÝÄ£ÐͱêΪ´íÎó¡£
ÀýÈ磬ÄÚÈÝÄ£ÐÍ((b, c) | (b, d))
ÊÇ·ÇÈ·¶¨Ð͵ģ¬ÒòΪ¸ø¶¨Ò»¸ö³õʼb
£¬·ÖÎöÆ÷ûÓÐÔÚÏòÇ°¿´ÒÔÖªµÀb
ºóÊÇʲôԪËØ֮ǰ£¬ÎÞ·¨ÖªµÀÆ¥ÅäÄ£ÐÍÖеÄÄĸöb
¡£ÔÚÕâÖÖÇé¿öÏ£¬Á½¸ö¶Ôb
µÄÒýÓÿÉÒÔ¼ò»¯³Éµ¥¸öµÄÒýÓã¬Ê¹µÃÄ£ÐͳÉΪ(b,(c | d))
¡£´Ëʱ³õʼµÄb
Ö»ºÍÄÚÈÝÄ£ÐÍÖеÄÒ»¸öÃû×ÖÃ÷È·Æ¥Åä¡£·ÖÎöÆ÷²»ÐèÒªÏòÇ°¿´ÆäºóµÄÄÚÈÝ¡£c
»òd
¶¼Äܱ»½ÓÊÜ¡£
¸üÐÎʽ»¯µÄ˵·¨£ºÊ¹ÓÃAho£¬SethiºÍUllmanËùÖø[Aho/Ullman]3.9½ÚÖеıê×¼Ëã·¨3.5£¬¿ÉÒÔ´ÓÄÚÈÝÄ£Ð͹¹Ôì³öÒ»¸öÓÐÏÞ״̬×Ô¶¯»ú¡£ÔںܶàÕâÑùµÄËã·¨ÖУ¬¶ÔÓ¦ÕýÔò±í´ïʽÖеÄÿһ¸öλÖÃ(¼´ÕýÔò±í´ïʽµÄÓï·¨Ê÷ÖеÄÿ¸öÒ¶×Ó½Úµã)£¬¶¼¹¹ÔìÒ»¸öË漯(follow set)£»Èç¹ûÈÎһλÖõÄË漯Öв»Ö¹Ò»¸öºó¼ÌλÖñ»±êΪͬһԪËØÀàÐÍʱ£¬ÄÇô´ËÄÚÈÝÄ£Ðͳö´í£¬²¢ÇÒ¿ÉÒÔ±»±¨Îª´íÎó¡£
´æÔÚ½«Ðí¶àµ«²»ÊÇËùÓзÇÈ·¶¨ÐÍÄÚÈÝÄ£ÐÍ×Ô¶¯¹æԼΪµÈ¼ÛµÄÈ·¶¨ÐÍÄ£Ð͵ÄËã·¨£»²Î¼ûBrüggemann-Klein 1991 [Brüggemann-Klein].
XML±àÂëÉùÃ÷ÔÚʵÌåÖÐÒÔÄÚ²¿±êÇ©µÄ·½Ê½¹¤×÷£¬ÓÃÓÚÖ¸³öʹÓÃÁ˺ÎÖÖ×Ö·û±àÂ롣Ȼ¶ø£¬ÔÚXML´¦ÀíÆ÷ÄܶÁÈ¡Õâ¸öÄÚ²¿±êÇ©Ç°£¬ÏÔÈ»Ëü±ØÐëÖªµÀµ±Ç°Ê¹ÓõÄÊǺÎÖÖ×Ö·û±àÂ룶øÕâÕýÊÇ´ËÄÚ²¿±êÇ©ÒªÊÔͼָ³öµÄ¡£Í¨³£Çé¿öÏ£¬ÕâÊÇÒ»ÖÖÎÞ·¨½â¾öµÄÇé¿ö¡£µ«ÔÚXMLÖв¢·ÇÈç´Ë£¬ÒòΪXMLÔÚÁ½¸ö·½Ãæ¶ÔÕâÖÖÇéÐÎ×÷³öÁËÏÞÖÆ£º¼Ù¶¨Ã¿Ò»ÖÖʵÏÖÖ»Ö§³ÖÒ»¸öÓÐÏÞµÄ×Ö·û±àÂ뼯£¬²¢ÇÒ£¬ÎªÁËʹµÃÕý³£Çé¿öÏÂ×Ô¶¯¼ì²âÿ¸öʵÌåÖÐËùÓÃ×Ö·û±àÂë³ÉΪ¿ÉÄÜ£¬ÏÞÖÆÁËXML±àÂëÉùÃ÷µÄλÖúÍÄÚÈÝ¡£Í¬Ê±£¬ºÜ¶àÇé¿öϳýÁËXMLÊý¾ÝÁ÷±¾ÉíÖ®Í⣬ÁíÍ⻹ÓпÉÓõÄÐÅÏ¢Ô´¡£¸ù¾ÝXMLʵÌå½»¸ø´¦ÀíÆ÷ʱûÓлòÓÐÈκεĸ½´ø(Íⲿ)ÐÅÏ¢£¬¿ÉÒÔÇø·Ö³öÁ½ÖÖÇé¿ö¡£ÎÒÃÇÏÈ¿¼ÂǵÚÒ»ÖÖÇé¿ö¡£
ÒòΪÿһ¸ö·ÇUTF-8»òUTF-16¸ñʽµÄXMLʵÌå±ØÐëÒÔXML±àÂëÉùÃ÷¿ªÍ·£¬Æ俪ʼµÄ¼¸¸ö×Ö·û±ØÐëΪ'<?xml
'£¬ÈκκϺõ¹æ·¶µÄ´¦ÀíÆ÷¿ÉÒÔÔÚÁ½µ½Ëĸö°Ëλ×éµÄÊäÈëºó£¬¼ì²â³öÊÊÓÃÓÚÏÂÁкÎÖÖÇé¿ö¡£ÔÚ¶ÁÕâÕűíʱ£¬ÖªµÀÕâЩÊÇÓаïÖúµÄ£ºÔÚUCS-4ÖУ¬'<'ÊÇ"#x0000003C
"£¬'?'ÊÇ"#x0000003F
"£¬UTF-16Êý¾ÝÁ÷µÄ×Ö½Ú´ÎÐò±ê¼ÇÒªÇóΪ"#xFEFF
"¡£
00 00 00 3C
: UCS-4£¬big-endian±àÂëµÄ¼ÆËã»ú(1234´ÎÐò)3C 00 00 00
: UCS-4£¬little-endian±àÂëµÄ¼ÆËã»ú(4321´ÎÐò)00 00 3C 00
: UCS-4£¬Òì³£µÄ°Ëλ×é´ÎÐò(2143)00 3C 00 00
: UCS-4£¬Òì³£µÄ°Ëλ×é´ÎÐò(3412)FE FF
: UTF-16£¬big-endian FF FE
: UTF-16£¬little-endian 00 3C 00 3F
: UTF-16£¬big-endian£¬ÎÞ×Ö½Ú´ÎÐò±ê¼Ç(Òò´ËÑϸñ˵À´³ö´í)3C 00 3F 00
: UTF-16£¬little-endian£¬ÎÞ×Ö½Ú´ÎÐò±ê¼Ç(Òò´ËÑϸñ˵À´³ö´í)3C 3F 78 6D
: UTF-8£¬ISO 646£¬ASCII£¬ISO 8859µÄһЩ²¿·Ö£¬Shift-JIS£¬EUC£¬¼°ÆäËûÈκÎ7룬8λ»ò»ìºÏ¿í¶ÈµÄÄܱ£Ö¤ASCII×Ö·ûÓÐËüÃÇÕý³£µÄλÖ㬿í¶È£¬È¡ÖµµÄ±àÂë;¾ßÌåÆäÖÐÄÄÒ»¸öÊÊÓÃÐè¶Áȡʵ¼ÊµÄ±àÂëÉùÃ÷À´¼ì²âÈ·¶¨£¬µ«ÒòΪËùÓÐÕâЩ±àÂëÖÐASCII×Ö·ûµÄλģʽÏàͬ£¬ËùÒÔÄܹ»¿É¿¿µØ¶ÁÈ¡±àÂëÉùÃ÷±¾Éí¡£4C 6F A7 94
: EBCDIC(ÔÚijЩ±äÖÖÖУ¬ÍêÕûµÄ±àÂëÉùÃ÷±ØÐëÄÜÓÃÓÚÈ·¶¨Ê¹ÓÃÁËÄÄÒ»´úÂëÒ³)ÕâÖÖ²ã´ÎµÄ×Ô¶¯¼ì²â×ãÒÔÓÃÓÚ¶ÁÈ¡XML±àÂëÉùÃ÷ºÍ·ÖÎö×Ö·û±àÂë±êʶ·û¡£×Ö·û±àÂë±êʶ·ûÈÔÈ»ÊDZØÐëµÄ£¬ËüÓÃÓÚÇø·Ö±àÂë·½°¸¼¯Öеĵ¥¸ö³ÉÔ±(ÀýÈç´Ó8859ÖÐÇø·Ö³öUTF-8£¬8859¸÷¸ö²¿·Ö¼äµÄÏ໥Çø·Ö£¬ÒÔ¼°Çø·ÖËùÓõÄÌض¨EBCDIC´úÂëÒ³£¬µÈµÈ)¡£
ÒòΪ±àÂëÉùÃ÷µÄÄÚÈÝÏÞÓÚASCII×Ö·û£¬Ò»µ©´¦ÀíÆ÷¼ì²âµ½Ê¹ÓõÄÊÇÄÄÒ»¸ö±àÂë·½°¸¼¯£¬ËüÄܹ»¿É¿¿µØ¶ÁÈ¡Õû¸ö±àÂëÉùÃ÷¡£ÒòΪÔÚʵ¼ÊÖУ¬ËùÓй㷺ʹÓõÄ×Ö·û±àÂ붼¿ÉÒÔ¹éÓÚÉÏÊöÖÖÀàÖУ¬XML±àÂëÉùÃ÷±£Ö¤ÁË¿É¿¿µÄÄÚǶ(in-band)×Ö·û±àÂë±ê×¢£¬¼´Ê¹ÊÇÔÚ²Ù×÷ϵͳ»ò´«ÊäÐÒ鼶µÄÍⲿÐÅÏ¢Ô´²¢²»¿É¿¿µÄÇé¿öÏ¡£
Ò»µ©´¦ÀíÆ÷¼ì²âµ½ËùÓõÄ×Ö·û±àÂ룬Ëü¾Í¿ÉÒÔ×÷³öºÏÊʵĶ¯×÷£¬»òÊÇÕë¶ÔÿÖÖÇé¿öµ÷Óõ¥¶ÀµÄÊäÈëÀý³Ì£¬»òÊǶÔÿ¸öÊäÈëµÄ×Ö·ûµ÷Óð汾ºÏÊʵÄת»»º¯Êý¡£
ºÍÈκÎ×Ô±ê×¢(self-labeling)µÄϵͳһÑù£¬Ò»µ©ÈκÎÈí¼þ¸Ä±äÁËʵÌåµÄ×Ö·û¼¯»òÆä±àÂë¶øûÓÐÏàÓ¦Ð޸ıàÂëÉùÃ÷µÄ»°£¬XMLµÄ±àÂëÉùÃ÷½«ÎÞ·¨¹¤×÷¡£×Ö·û±àÂë·½°¸µÄʵÏÖÕß±ØÐëСÐÄ×Ðϸ£¬ÒÔ±£Ö¤ÓÃÓÚ±êעʵÌåµÄÄÚ²¿ºÍÍⲿÐÅÏ¢µÄÕýÈ·ÐÔ¡£
µÚ¶þÖÖ¿ÉÄܵÄÇé¿öÊÇXMLʵÌåÓи½´øµÄÐÅÏ¢£¬ÈçÔÚһЩÎļþϵͳºÍÍøÂçÐÒéÖС£µ±¾ßÓжà¸öÐÅϢԴʱ£¬ËüÃǼäµÄÏà¶ÔÓÅÏȼ¶ºÍÊ×Ñ¡³åÍ»´¦Àí·½·¨±ØÐëÔÚ´«ÊäXMLµÄ¸ß²ãÐÒéÖиø³ö¡£ÀýÈ磬ÄÚ²¿±êÇ©ºÍÍⲿÎļþÍ·ÖеÄMIMEÀàÐͱêÇ©µÄÏà¶ÔÓÅÏȼ¶Ó¦¸ÃÊǶ¨Òåtext/xmlºÍapplication/xml MIMEÀàÐ͵ÄRFCÎĵµµÄÒ»²¿·Ö¡£È»¶ø³öÓÚ»¥²Ù×÷ÐÔ¿¼ÂÇ£¬½¨ÒéʹÓÃÏÂÁйæÔò¡£
charset
²ÎÊý¾ö¶¨ÁË×Ö·û±àÂë·½·¨;ËùÓÐÆäËûÐÅÏ¢Ô´ºÍÍƶ϶¼½ö½öÓÃÓÚ´íÎó»Ö¸´¡£ÕâЩ¹æÔòÖ»ÊÊÓÃÓÚȱÉÙÐÒ鼶ÎĵµÊ±µÄÇé¿ö£»ÌرðÊÇ£¬µ±Ïà¹ØRFCÖж¨ÒåÁËÕâЩtext/xmlºÍapplication/xml MIMEÀàÐÍʱ£¬RFCÖеĽ¨ÒéÈ¡´úÕâЩ¹æÔò¡£
±¾¹æ·¶ÓÉW3C XML¹¤×÷×é(WG)Íê³É²¢Åú×¼·¢±í¡£¹¤×÷×éÅú×¼±¾¹æ·¶²¢Ò»¶¨±íʾËùÓеŤ×÷×éµÄ³ÉÔ±¶¼Ò»ÖÂͬÒâ±¾¹æ·¶¡£ÏÖÓкÍÒÔÇ°µÄXML¹¤×÷×é³ÉÔ±°üÀ¨£º
Jon Bosak, Sun (Chair); James Clark (Technical Lead); Tim Bray, Textuality and Netscape (XML Co-editor); Jean Paoli, Microsoft (XML Co-editor); C. M. Sperberg-McQueen, U. of Ill. (XML Co-editor); Dan Connolly, W3C (W3C Liaison); Paula Angerstein, Texcel; Steve DeRose, INSO; Dave Hollander, HP; Eliot Kimber, ISOGEN; Eve Maler, ArborText; Tom Magliery, NCSA; Murray Maloney, Muzmo and Grif; Makoto Murata, Fuji Xerox Information Systems; Joel Nava, Adobe; Conleth O'Connell, Vignette; Peter Sharpe, SoftQuad; John Tigue, DataChannel
/-->/"-->