xsl-list
[Top] [All Lists]

Cannot have multiple DOCTYPE declarations

2005-03-10 12:01:23
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? Via XSL
perhaps?

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 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>
  • Cannot have multiple DOCTYPE declarations, c p <=