Thank you for the response. I thought it might have something to do with what you said below. I don't have a problem opening the file in Visual, but the message appears as an error and I wanted to make sure it wouldn't have anything to do with the output. Since it doesn't, I'll continue to view the code in Visual and just ignore the error. Thank you again for the timely response. It's greatly appreciated.
Regards. -----Original Message----- From: Hussein Shafie [mailto:[email protected]] Sent: Wednesday, February 16, 2011 3:19 PM To: Hale, Denise Cc: '[email protected]' Subject: Re: [XXE] Cannot find dtd file On 02/16/2011 07:51 PM, Hale, Denise wrote: > I'm new to XMLMind, and don't know if this has already been discussed. I > recently uninstalled and reinstalled the latest version of XMLMind > Personal edition. When I create a new DITA topic of any type (concept, > task, etc) and then view the code in Visual Studio, I get an error > message stating that the dtd file cannot be found in a location on my > C:\ drive. > > Here's the code for the dita file. > > <?xml version="1.0" encoding="UTF-8"?> > > <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" > > "topic.dtd"> > > <topic id="Untitled"> > > <title>dgad adfg</title> > > > > <body> > > <p>adf gagafdg</p> > > </body> > > </topic> > > > I have spent a long time trying to resolve this issue and I'm at a lost. > What is going on? > Visual Studio sees: <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd"> and tries to load local file "topic.dtd". It does not find it because this file indeed does not exist here. In fact, what's important in: <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd"> It's the DTD identifier "-//OASIS//DTD DITA Topic//EN" and not the file path "topic.dtd". File path "topic.dtd" is added here just because it's mandatory to have one in XML. XMLmind XML Editor and any other XML editor which supports DITA use *XML* *catalogs* to find the actual location of the DTD identified by "-//OASIS//DTD DITA Topic//EN". More info. about XML catalogs: http://xml.apache.org/commons/components/resolver/resolver-article.html Excerpts from <XXE_install_dir>/addon/config/dita/catalog.xml: --- <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public"> ... <group xml:base="schema/v1.2/technicalContent/dtd/"> ... <!-- Topic for use in the technical content package --> <public publicId="-//OASIS//DTD DITA Topic//EN" uri="topic.dtd"/> ... --- In plain English, the above excerpt means: you'll find DTD "-//OASIS//DTD DITA Topic//EN" in file <XXE_install_dir>/addon/config/dita/schema/v1.2/technicalContent/dtd/topic.dtd In summary, either Visual Studio supports XML catalogs (like any true XML editor) and in such case you should configure it to add the following XML catalog to its XML catalog list: <XXE_install_dir>/addon/config/dita/catalog.xml OR you'll have to use a plain text editor and replace: <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd"> by: <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "<XXE_install_dir>/addon/config/dita/schema/v1.2/technicalContent/dtd/topic.dtd"> in order to be able to open your DITA document in Visual Studio. Example: <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "file:/C:/Program%20Files/XMLmind_XML_Editor/addon/config/dita/schema/v1.2/technicalContent/dtd/topic.dtd"> Notice: * The location of topic.dtd is an URL, and not a filename. * This makes your DITA document depend on the installation directory of XMLmind XML Editor, which is inelegant and error-prone. My advice: do not use Visual Studio to view the code. Instead use any plain text editor (e.g. Notepad++). -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

