[xsl] Cannot have multiple DOCTYPE declarations

Subject: [xsl] Cannot have multiple DOCTYPE declarations
From: c p <bugs75il@xxxxxxxxx>
Date: Thu, 10 Mar 2005 11:01:23 -0800 (PST)
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

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? Via XSL


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">
  <text>Some content goes here ...</text>

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 

Current Thread