Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

XML read errors--failure to open dtd (DITA)

Guest
Jul 08, 2008 Jul 08, 2008
Hi all,
I've run out of ideas and places to look on this one, I hope someone can help.

The specs: WinXP Pro, Frame 8.0p277. Built-in DITA. Not using DITA Open Toolkit. No major issues except for previously discussed conref problems which, many thanks to Scott, seem to be under control.

The context: I'm a freelancer, on contract to a financial institution. I work part-time in my own office (up-to-date, preferred set-up) and part-time onsite. I can't go into detail, but the set-up is less than ideal. I have to do much back-and-forth portaging of project and template files, and they are often corrupted when I reopen them.

Specs onsite I'm not sure about, but it's definitely Frame 8 with the first patch. I'm pretty sure they haven't installed any others, so the 8.03 patch shouldn't be an issue. (I'll check and report back, if that info is needed.)

The error: Came out of the blue last week, my first day back in my office after three days onsite. Now, every time I open or create any xml file, using any template, I get an XML Read Report Log error that reports a failure to open the DTD, and a parse error in the document prolog. I don't know where it's coming from, and I don't know why it started happening. I modified structapps once, many months ago, but hadn't touched it since, and I've never touched the r/w rules files in either location.

(I realize I should test this scenario onsite, but I daren't risk importing trouble, if it started here.)

Specifically, the error reads: Could not open DTD file: C:\Documents and Settings\path-to-project-files-folder\ditabase.dtd Parse error at line 9, char 1: Error procssing external entity reference.

I don't understand why it's looking for the dtd file in the same folder as the project files when I've never stored it there, and I have the following in the structapps, and r/w rules files.

DTD: $STRUCTDIR\xml\dita\default-app\dtd\ditabase.dtd
Read/write rules: $STRUCTDIR\xml\dita\default-app\DITA-Topic-FM\topic.rules.txt

The R/W Rules statement reads: writer external dtd is public "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd";

I can go completely cross-eyed after a few hours trying to parse these docs myself. The answer may well be right in front of me, but for the life of me I can't see it. I hope someone else can.

Karen
TOPICS
Structured
5.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 08, 2008 Jul 08, 2008
Hi Karen...

The only thing that jumps out at me are the structapp paths .. if you haven't changed from the defaults they should point to ..

$STRUCTDIR\xml\dita\app

not this ..

$STRUCTDIR\xml\dita\default-app

That is, unless you created your own app called "default-app".

The other thing to check is the doctype declaration in the DITA files themselves. Have the DITA files been edited in another editor that is changing the doctype declaration in some way? The first two lines should look like this ..

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd" [

Lemme know.

...scott
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 10, 2008 Jul 10, 2008
Hi Scott,
Yes, I created a default-app on my home system, and on the client's system. I am a one-woman, multi-project travelin' roadshow and this had been, up until recently, the easiest way to make sure all the references continued to work regardless of project, location and future user's skills with Frame. I saved the original app as a baseline folder, and then made all the critical references for all custom apps point to the default-app folder. Templates I kept in custom folders. In any case, it had been working error-free till last week.

K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jul 10, 2008 Jul 10, 2008
Karen,

Have you recently added the external DTD rule or moved the documents you are exporting to a different directory? Unless the API client is changing the external identifier (Scott?), FM does not merely copy the system identifier in the external DTD rule, but tries to interpret it as a relative filename and generate the corresponding absolute path. As you have seen, this attempt is not always what you want.

--Lynne

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jul 12, 2008 Jul 12, 2008
Karen,


You write that:


But the xml fails validation tests outside of Frame. The result reads: Line: 9; Line Position 3; File Position: 212; Error: The system cannot locate the object specified. Error processing resource 'ditabase.dtd'.

You'll either need to replace the relative pathname produced by FrameMaker or provide an appropriate search path to your other XML tools so that they can find the DTD.

--Lynne

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 12, 2008 Jul 12, 2008
Hi Lynne, Hi Scott,
My brain is a bit fried these days, so forgive me if what I say makes no sense. Regarding the relative path: I understand the concepts but not well enough to risk fooling around with entity references of any kind, dtd folders, or r/w rules files. Until I began troubleshooting, I hadn't touched structapps for months. I'd set up the project directory onsite so that it matched mine, and then tested the whole setup till I was sure it worked on both systems. Which it had done since last September. It was also working there just fine yesterday (Friday.) It's only on my system that I'm having trouble, and I haven't changed anything here, either.

(With regard to your follow-up, yes, I understand, but I opened them in other editors _after_ this started happening (to try and find out what was going on), not before.)

Having said all that: say I give up trying to figure out how it happened, what component of the structured application do I need to fix so that my files will open properly in Framemaker? So far, I believe, I've checked them all, but they all seem to be correct. (I'm assuming there's a template, edd, r/w rules or structapps issue because I've created and tested a dozen brand new files and they all have the same Read error on file creation, save and open. (ie. it's not just affecting existing project files.)

Anyway, if it goes away, I'll let you know. Meantime, I very much appreciate your feedback. I think I'll spend a lazy Sunday curled up with the SADG...again ;-)

Karen
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jul 14, 2008 Jul 14, 2008
Karen,

Do you have a backup of a configuration that worked? If so, you might compare it, one file at a time, to the current system. Have you updated FrameMaker itself in the meantime?

--Lynne

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 14, 2008 Jul 14, 2008
Hi Lynne,
Since this saga began, I haven't updated my own copy of Frame. I don't know what's been done to the onsite copy but I'll be able to check tomorrow.

I spent last night doing a line-by-line comparison of the original structapps, templates and EDD files, those from my system, and copies of those I use onsite. There were some element definition and formattting errors in my own templates which were likely introduced by my RSI-afflicted mouse-hand (it's not so steady sometimes--I can click things I don't mean to click). With luck (?) these are what caused the original problem. (I haven't had a chance to test my fixes.) There was an incorrect variable in my structapps, too, but I'm certain this was a recent error introduced the same way during troubleshooting. (I did the same thing when I was fixing it, but caught it before I hit Replace.)

However...

I was puzzled to discover that the ConditionalText/ OutputTextProcessingInstructions in one of the active structapps files were transposed, at least in comparison to the originals. ie where the originals were set to WithPIs, the active versions were set to Without, and vice versa. This was for the topic, map and book apps. There doesn't seem to be a variable associated with that element, so I don't see what I could have done. (I'm a freelancer, and what I break, I fix, generally. I learned enough about structured application development to figure out what I needed to tweak, then I got out and stayed out.) If you have an idea (or you actually know ;-), please enlighten me!

Best wishes,
Karen
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 15, 2008 Jul 15, 2008
Well, I'm on the verge of a complete reinstall from scratch. I've restored and reread structapps, restored and checked the r/w rules, restored edds and templates and reimported definitions and formats--all from back-ups on my external drive which all worked when I put them there--and all to no avail. I'm still getting the same error: a path that isn't written anywhere, to a file that never existed in that location. I suppose it could be coming from outside Frame, but I have no earthly idea where from and I'm losing money hand over fist. I give up.

K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 17, 2008 Jul 17, 2008
Karen,

You wrote:
> I spent last night doing a line-by-line comparison of the original structapps, templates and EDD files, those from my system, and copies of those I use onsite.

You can do such a comparison in minutes with Araxis Merge (www.araxis.com). It can do a 2/3 way comparison for files and folders.

Great time-saver for me.

S_
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 28, 2008 Dec 28, 2008
Hello Karen,

Have you been able to resolve this issue? I'm encountering a similar issue while going through the FrameMaker 8 Help topics: Processing XML > Migration from Unstructured FrameMaker to XML > Getting started with structure.

I have followed along with all the examples all the way down to the "Testing XML round-tripping" topic. When I go to the step: Export the FrameMaker file to XML, and select my XML application, I get a parsing error similar to what you had mentioned above.

The Help topics have you first build an EDD for a simple document (proposal) - successful.

They then have you open a new document and import the EDD - successful.

They then have you add formatting to the EDD and then reimport into your document to test it. - successful

They then have you build the structured app by saving the EDD to DTD. You are then supposed to create a template by removing all the content from your original file that they had you open and save it as a template. Then you are supposed to edit the application definition file. Finally you copy the template and the DTD to the Adobe FrameMaker 8 folder. - successful

I've done this process twice and each time I get the same Save to XML Log error message when trying to export my document to XML.

The first things that are displayed are the path the source and destination folders.

Next is the XML parser error messages (Document Prolog).

There are basically 2 parsing errors, line 3 and 9.

line 3, "Could not open DTD file" C:\DOCUME~1\MICHAE~1\LOCALS~1\Temp\$STRUCTDIR\XML\Preface\Preface.dtd
Error in processing external entity reference"

line 9, "Could not open DTD file" C:/Documents%20and%20Settings/michael_randall/My%20Documents/FrameEDDTemplatePractice/$STRUCTDIR/XML/Preface/Preface.dtd
Error in processing external entity reference"

Please let me know if have any new information.

Thanks,
Michael Randall
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 28, 2008 Dec 28, 2008
LATEST
Hello Michael,
I think this is a question for Scott Prentice, to tell you the truth. I hope he's listening.

I _was_ able to resolve my issues, but you've done a couple of things I didn't have to, so our situations are different.

First, I was (am) working with the DITA applications and used the Adobe-supplied EDDs and DTDs. I never had to build my own structured applications.

Second, "all" I ever did was change the references in the structapps file so that the applications, and associated templates and content, would work whether I opened them on my system, or on my client's system. For the longest time, they did...then all of a sudden they didn't. Long story, but I don't think it was a technical issue. In attempting to fix the references, I think I introduced a few errors of my own, which made things more confusing. In the end, I opted to rebuild my templates from scratch, again using the default EDDs.

Till you hear from someone with real expertise, I'll just note that-- in my very humble opinion--you seem to have a few files and folders in the wrong places. Have you moved (or copied) things from the folders they were installed to? That could be a big part of the problem, especially if the Structured Application directory, and structapps.fm in particular, are involved, as they appear to be. I do not believe structapps.fm should be moved from its original location. Just make sure it references your templates and folders correctly. (Make a back-up of structapps.fm if you're ever tempted to modify it. This is the beast's frontal lobe. Bad things happen if you poke it in the wrong place 😉 If you change anything, make sure to reread the application definitions, from the StructureTools menu.

I wish you the best of luck--this learning curve drove me bananas and back again.
Karen
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines