[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Cannot have multiple DOCTYPE declarations

  • To: xml-dev@l...
  • Subject: Cannot have multiple DOCTYPE declarations
  • From: c p <bugs75il@y...>
  • 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= ;

cannot have multiple doctype declarations
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 

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.