[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Cannot have multiple DOCTYPE declarations
On Thu, Mar 10, 2005 at 11:00:07AM -0800, c p wrote: > 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. Most likely you want one of: (1) to use links instead of entity references depending on how you process the XML, you might use XLink, or even just <a href="..."> ...</a> (2) you might be trying to include fragments of XML in a single larger file. The DTD (if any) referred to is for the result of including them, and should be referenced by the outer "index.xml" file. The individual pieces should not have DOCTYPE at the start, as they are external parsed entities (in XML jargon) and not complete documents. (3) you want to do (2) but to include entire XML files. In this case, either use XInclude (e.g. with libxml and/or xsltproc) to include them, or set up each XML file like this (here is "outer.xml" for example:) <!DOCTYPE whatever SYSTEM "XXX" [ <!ENTITY the-doc SYSTEM "inner.xml"> ]> &inner.xml; and in index.xml include inner.xml rather than outer.xml The outer.xml file is just a wrapper so you can include the same document from two places. But I think (2) is most likely what will work for you -- just delete the DOCTYPE declarations on the included files. Liam -- Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/ http://www.holoweb.net/~liam/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|