Here is an interesting question. I have a document I am working that still uses a DTD. The document consists of several file entities. Each ENTITY uses the OASIS TR 9601 Fragment Interchange (which Epic beautifully supports).
For those not familiar with this TR, basically it allows you to use a top level DOCTYPE in documents that are subsets of the DOCTYPE (e.g., DOCTYPE is 'doc' and you have a 'chapter').
My question is does anyone know if any other XML (that support DTD) also support the TR 9601. I do not think Spy or Oxygen do (or if they do I haven't found the key for it to work).
I want to work with this document on another computer that does not have Epic and every time I open the file there are serious parsing error (mainly ENTITIES declared either in the DTD or in the file's declaration subset) are not being read. The reason appears to be because the TR has the Doctype Declaration and its subset within a 'comment'
That might be a solution. Though I really don’t want to mess with the 70 or so files. Also I am not sure if I would have to change the DOCTYPE of each subordinate file to the top level tag of the file (most likely).
I may just change all the subordinate files and to do away with the ‘fragment’ support and see what happens.
Well I am still struggling with this problem. Most of yesterday was spent dealing with a problem at the house, but I did migrate the files to have their DOCTYPE name be the root element of the file.
Epic does not have a problem, but Spy and Oxygen don’t like the DOCTYPE in the entity files.
I’ve started looking at XINCLUDE. Again Epic has neat internal shortcuts that allow the element <xi:include> (and an <xi:fallback> as well) to appear without being declared in the DTD. Spy and Oxygen would like them declared somewhere (actually so would I).
Therein lies my problem. I know how to declare these in schema. However, I am still stuck with a DTD and I am not sure how to do this. So before I spend any more time trying to figure out how, I figure I’ll ask if anyone has declared the <xi:include> in a DTD and if so how.
I don't know that I've ever had to add XInclude elements to a DTD, though I'm pretty sure I've had to do so for other namespaced elements.
The trick is that DTD, unlike Schema, is not namespace-aware, so you really just need to decide what prefix you'll use and declare the element with that as part of the name and add the appropriate attribute definitions, including the one for the namespace declaration (i.e., "xmlns:xi"). This all works because the colon is a valid XML name character. As far as DTD is concerned, it's just another name.