You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Casey, Greg" <GC...@Engage.com> on 2000/07/14 18:20:09 UTC

Document Type Declarations...

This question isn't really a Xerces specific question, but you folks are all
so knowledgable and responsive about this stuff that I hope you will bear
with me.
 
Is there a rule against having two DOCTYPE declarations in an XML file? 
 
The reason I ask is because this was the solution to my previous "namespace"
related problem, and it seems to work just fine with the Xerces parser. The
parser is validating against both DTDs (and that's all I really wanted,
anyway). Here's an example of what I have:
 
<?xml version="1.0"?>
<!DOCTYPE enga PUBLIC 'engage.dtd' 'file:///d:/DTDs/engage.dtd'>
<!DOCTYPE adXML PUBLIC 'adXML.dtd' 'file:///d:/DTDs/adXML.dtd'>
<....rest of the XML doc here....>
 
(Ofcourse, in the real world, the file-based URL will be replaced with a
real http-based unique URL. This is just for testing purposes.)
 
The parser is recognizing and validating tags found in both dtds. I'm just
curious if I'm breaking some rule or if I shouldn't expect other XML parsers
to work the same way. 

Thanks for you input,
 
-gtc
 
------------------------------------------------------------
Greg Casey
Senior Software Engineer
Engage
gcasey@engage.com <ma...@engage.com>