To experiment, I composed simple hierarchical structure
<JavaRanch>
...<forum>
... ... ... <
thread>
... ... ... ... ... ... <post/>
and splitted DTD for it in three parts:
Input xml: <?xml version="1.0" standalone="no" ?>
<!DOCTYPE JavaRanch
[
<!ELEMENT JavaRanch (forum+)>
<!ENTITY % forum SYSTEM "forum.dtd">
<!ENTITY % thread SYSTEM "thread.dtd">
%forum;
%thread;
]>
<JavaRanch>
<forum>
<thread>
<post/>
</thread>
</forum>
</JavaRanch>
Forum.dtd <!ELEMENT forum (thread+)>
Thread.dtd <!ELEMENT thread (post+)>
<!ELEMENT post (#PCDATA)>
<!ATTLIST post quality CDATA #FIXED "high">
(later I added default value for an attribute to check if external declarations are, in fact, read).
Merlot detected an error and said that element "forum" refers to undeclared element "thread". IE ate the input without any complain. XML Spy didn't say a
word against either (but XML Spy is know for allowing incorrect DTDs). Finally, I run primitive XSLT with Xalan, and not only didn't Xalan complain, it indeed processed declarations from external DTDs because "quality" attribute got its value.
XSLT: <xsl:template match="/">
<xsl:copy-of select="."/>
</xsl:template >
</xsl:stylesheet>
Output: <?xml version="1.0" encoding="UTF-8"?>
<JavaRanch>
<forum>
<thread>
<post quality="high"/>
</thread>
</forum>
</JavaRanch>
So we must admit that it works (Of course, Dan already said it three posts ago
)