我正在学习xml。我创建小的 xml 文件和 dfd 文件。这是xml文件
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="stylesheet.css"?>
<!DOCTYPE software SYSTEM "software.dtd"
[
<!ATTLIST title ttl CDATA "no name">
<!ATTLIST license lcs CDATA #REQUIRED>
]>
<software>
<application>
<suite>
<app>
<title ttl="MOffice">Microsoft Office</title>
<developer>Microsoft</developer>
<os>Microsoft Windows</os>
<license>Trialware</license>
</app>
<app>
<title>iWork</title>
<developer>Apple</developer>
<os>Mac OS</os>
<license>Proprietary</license>
</app>
<app>
<title ttl="Office">Open Office</title>
<developer>StarOffice,OpenOffice.org,Apache OpenOffice</developer>
<os>Linux, Mac OS, Microsoft Windows</os>
<license>LGPL,Apache License</license>
</app>
</suite>
</application>
</software>
这是dfd文件
<!ELEMENT software(application)>
<!ELEMENT application(suite) >
<!ELEMENT suite(app*)>
<!ELEMENT app(title,developer,os,license)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT developer(#PCDATA)>
<!ELEMENT os(#PCDATA)>
<!ELEMENT license(#PCDATA)>
<!ATTLIST os osx CDATA #REQUIRED>
它应该是不正确的 xml 文件,因为没有属性osx
和lcs
inos
和license
元素。但是 Internet Explorer 可以正常打开它。为什么?