OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Cannot have multiple DOCTYPE declarations

[ Lists Home | Date Index | Thread Index ]
  • To: xml-dev@lists.xml.org
  • Subject: Cannot have multiple DOCTYPE declarations
  • From: c p <bugs75il@yahoo.com>
  • Date: Thu, 10 Mar 2005 11:00:07 -0800 (PST)
  • Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=ZswW6vYjAXqNLoGLXCRfFYj/xcdPR8yLMn1BgjwbYDwz794t8rEz2Hs9KbqE6ZVBDsFvVc9p3Vv1QILx8lPXnBOORgFdk5IiejJEmhW25KNazEZWDZcCR53k9qUtH518KeUAMbiot1jK04dloJ7TiBlHtncekjSE2zgjFWNE9uI= ;

Hello all,

I have a directory that holds a whole bunch of XML
files.  For each such directory, I also have an
index.xml file.  In the index.xml file, it holds some
text data to describe that directory content and then
it includes a reference to each XML file in that
directory.  This referencing is done through entity
file.

The problem I am running into is that when the
index.xml file gets parsed, it tries to include each
of the other .xml file into it via the entity
reference.  It is able to locate the file that it
needs to include into index.xml but the problem it
runs into is that each of these individual .xml files
also have a <!DOCTYPE ....> declarations in it.  And
the index file already has its own <!DOCTYPE ....>
declaration.  So it errors out and tells me something
like this: Cannot have multiple DOCTYPE declarations.
Error processing resource 'index.xml'

Is there any way to achieve what I need?

Thanks,

Here is the index.xml and .ent file.

Here is the index.xml
----------------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE mazda-sm SYSTEM "my_xml.dtd" [
    <!ENTITY % external-entities SYSTEM "files.ent">
    %external-entities;
]>
<root>
  <text>Some content goes here ...</text>
  &file1;
  &file2;
  &file3;  
</root>
----------------------------------------------------

files.ent file holds references to all the files:
----------------------------------------------------
<!ENTITY file1 SYSTEM "file1.xml" >
<!ENTITY file2 SYSTEM "file2.xml" >
<!ENTITY file3 SYSTEM "file3.xml" >
----------------------------------------------------

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS