6
的test.xml:外部引用的DTD在XML
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE email SYSTEM "test.dtd">
<email>
<von>[email protected]</von>
<zu>[email protected]</zu>
<titel>Hello</titel>
<text>Dear John....;-).</text>
<prior type="schnell"/>
</email>
test.dtd:在test.dtd
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE email [
<!ELEMENT email (von,zu,titel,text,prior)>
<!ELEMENT von (#PCDATA)>
<!ELEMENT zu (#PCDATA)>
<!ELEMENT titel (#PCDATA)>
<!ELEMENT text (#PCDATA)>
<!ATTLIST prior type CDATA #REQUIRED >
]>
錯誤代碼包含
的標記聲明或指向文檔類型聲明必須格式良好。 [2]
請幫忙!!