Skip to main content
January 27, 2012
Answered

Problem Working With Framemaker 9 Dita XML Files in Framemaker 10

  • January 27, 2012
  • 2 replies
  • 3107 views

I just upgraded to Framemaker 10. I am encountering a number of problems when I try to work with my Dita XML help topics, which were last saved in Framemaker 9 format.

1. Using the Default Dita Template

When I open one of my documents in Framemaker 10, the Dita 1.2 template ditabase.fm is automatically applied. Everything seems fine. But then when I convert the XML to Eclipse help (which is essentially html, so we're going from XML to HTML) using Dita Open Toolkit ant scripts, I see this message:

[pipeline] [DOTJ013E][ERROR] Failed to parse the referenced file 'html\c_licensing.xml' due to below exception. Please correct the reference base on the exception message.
[pipeline] c_licensing.xml Line 25:Attribute "xmlns:ditaarch" must be declared for element type "dita".

I then opened the xml  file in a text editor, and I saw this on line 25:

<dita xmlns:ditaarch = "http://dita.oasis-open.org/architecture/2005/">

Line 25 looks fine to me. Am I missing something? 

2. Switching to a 1.1 Dita Template

I tried to work around the above problem. In Framemaker, I tried to set a different structured application as the default one. I closed all files and chose the default Dita 1.1 structured application (it defaults to the Dita 1.1. Composite app.)

Then I tried to open my file: I got this message inside Framemaker:

"Validation of XML failed. Continue?
Error at [FILE PATH], line 25, char 72, Message: Attribute '{http://www.w3.org/2000/xmlns/}ditaarch' is not declared for element 'dita'

Sounds familiar, doesn't it?

I switched from the default Dita 1.1. Composite structured application to the Dita 1.1. Topic structured application. Then I dirtied the source file and saved it. The messages I got in FrameMaker log window included the one above, plus I got a variety of Unknown Element messages, things like this:

Unknown element dita,

unknown element concept,

various attributes are not declared for concept,

unknown element conbody.

If I switch back to the Dita 1.1 Composite application all of these messages diappear except for this one:

Attribute '{http://www.w3.org/2000/xmlns/}ditaarch' is not declared for element 'dita'


My ant conversion scripts from the Dita Open Toolkit are still unable to process this file. They give the same message as is listed in (1) above and the file is not converted to HTML.


Can anyone help me with this problem? I've also posted this question to the Dita Users Group on Yahoo Groups. If I get an answer in one place, I'll post it in the other.

Thanks,

Nina P.

This topic has been closed for replies.
Correct answer ScottPrentice

[cross-posted to dita-users]

Hi Nina...

The xmlns:ditaarch attribute should be on the "topic" element not the root dita element. if the FM10 structure application is assigning that, it's wrong. Are you creating composite topics (multiple topics in one file under the dita root)? If not, you can get rid of the dita element altogether and that may "fix" the problem.

The first error you're getting (#1) is saying that the xmlns:ditaarch attribute needs to be declared (that is, defined in the DTD) .. it's not (because it's not supposed to be there (as far as I know). It's not saying that it should be declared in the DITA file.

Same for error #2 .. the 1.1 composite app is apparently set up properly, so it's saying the same thing that the OT is saying .. "you've got this attribute in the XML file, but it's not declared in the DTD".

Your later error about missing elements is because you've switched to the "topic" DTD, which doesn't know about the dita element or the concept-based elements.

If you can unwrap the dita element from your files (because you're just using one topic in each file), that may solve the problem. But what you probably should do is open these files in a text editor and remove the xmlns:ditaarch attribute from them (it's not really needed on the topic elements either since it's the default value). Then I'd switch to the 1.1 composite app as your default. I'll take a look at the default FM10 1.2 app and see what's up. (I've not seen this problem since I'm using DITA-FMx which has it's own structure apps.)

Cheers,

...scott

Scott Prentice

Leximation, Inc.

www.leximation.com

2 replies

January 27, 2012

Thank you very much, Scott. Removing that xmls:ditaarch attribute from the Dita element worked. The XML document now opens and saves fine in Framemaker, using the 1.1 Composite template.  It also converts to HTML when I run the ant script.

I also tested unwrapping the Dita element from the document. That seemed to work fine as well. The document saved without any errors in Framemaker and it converted to HTML.

I next tried appying the Dita 1.2 ditabase structured app to my source file. It saved properly in Framemaker and the ant scripts did not complain, but I'm going to reapply the the 1.1 Composite template.

Finally, the topics display correcty in the help system.

Not all of my topic files have that attribute in the Dita element, but a good number of them do. Looks like I need to do a bulk search and replace.  Or just remove the Dita element as I open each file.

Was the Dita element once used with older versions of Framemaker?  I am just wondering how it and that attribute got into my source filees in the first place?  I don't recall ever adding it; I think it was always there.

Again, thanks for your help, this had me stumped.

ScottPrentice
Inspiring
January 27, 2012

Hi Nina...

I think that the FM templates have always defaulted to creating dita-rooted files. With the Composite (or ditabase) app, you can have it both ways .. which is nice in FM so you only have to maintain one structure app rather than one for each topic type. The reason for using a dita-rooted file is so that you can have multiple top-level topics in one file. If you're not creating files that contain more than one topic, then there's no reason to use the dita element. It's most common to just have one topic per file so in general the dita element isn't used.

Cheers,

...scott

February 2, 2012

Thank you for these additional details, Scott. I think I might have a couple of topic types in my task topics: I wanted related links sections in those at one point and I believe I cobbled something together by adding a concept element at the end of the task. I'll watch out for that!

I'm having a new problem. I cloned the Framemaker 10 DITA app. and named it DITA-BigPage, following your instructions which you kindly provided me for Framemake 9 a couple of years back. I must do this because I need one page size for my eclipse help topics and another page size for the PDFs.   I altered structapps.fm as well, again following your instructions for cloning the elements in that file and changing their paths and their application name to that of the EDD in my Dita-BigPage clone. I believe I did all of this correctly.

But when I open a Dita XML document, either one that I've stripped the Dita element from (they say Reference or Concept, etc. at the top, now) or one that still has the Dita element but without the attribute, the default structured application that is applied is DITA 1.1-Reference-FM or DITA 1.1-Composite-FM, not DITA 1.1-Reference-BigPage-FM or Dita 1.1-Composite-BigPage-FM.  I can choose "set structured application" from the Structure Tools menu, and select any one of my modified "BigPage" apps, but when I do that my XML page width does not expand  the way it should if a "BigPage" template were actually being applied.I save the file and reopen it and the default assigned structured app is Dita 1.1-Reference-FM, not my BigPage clone. 

I tried manually importing the formats from the BigPage template into my document file, but they don't "stick." As soon as I save, close and reopen the file, I'm back to square one.

I looked for a way to set the structured application permanently and came across the DITA Applications Mappings Manager, but the documentation on this is so sparse and lacking in context that I don't know (a) if using this will give me the result I want and (b) how to get this utility to "see" my BigPage structured apps. (Currently my BigPage apps do not appear in any of that dialog's selection areas).

FrameMaker 9 used to pop open a little dialog each time I opened a file asking me which structured app I wished to use with the file. The dialog remembered my last choice, which was always my custom BigPage application, and so my pages always formatted correctly. FrameMake 10 seems to be doing things a bit differently, and I'm not sure how to get it to use my custom application with the large sized page.  That is the only change I made to my new application: I set the template's page size from letter to tabloid.

ScottPrentice
ScottPrenticeCorrect answer
Inspiring
January 27, 2012

[cross-posted to dita-users]

Hi Nina...

The xmlns:ditaarch attribute should be on the "topic" element not the root dita element. if the FM10 structure application is assigning that, it's wrong. Are you creating composite topics (multiple topics in one file under the dita root)? If not, you can get rid of the dita element altogether and that may "fix" the problem.

The first error you're getting (#1) is saying that the xmlns:ditaarch attribute needs to be declared (that is, defined in the DTD) .. it's not (because it's not supposed to be there (as far as I know). It's not saying that it should be declared in the DITA file.

Same for error #2 .. the 1.1 composite app is apparently set up properly, so it's saying the same thing that the OT is saying .. "you've got this attribute in the XML file, but it's not declared in the DTD".

Your later error about missing elements is because you've switched to the "topic" DTD, which doesn't know about the dita element or the concept-based elements.

If you can unwrap the dita element from your files (because you're just using one topic in each file), that may solve the problem. But what you probably should do is open these files in a text editor and remove the xmlns:ditaarch attribute from them (it's not really needed on the topic elements either since it's the default value). Then I'd switch to the 1.1 composite app as your default. I'll take a look at the default FM10 1.2 app and see what's up. (I've not seen this problem since I'm using DITA-FMx which has it's own structure apps.)

Cheers,

...scott

Scott Prentice

Leximation, Inc.

www.leximation.com