Highlighted

Converting structured FM to DITA

New Here ,
Aug 18, 2015

Copy link to clipboard

Copied

Hello,

I have received structured FM file from a client and I would like to convert this file to DITA.

I have tried to achieve this several times by restarting from the beginning and by reading all the doc I could find, but I cannot manage to get my XML file.

Below are the steps I followed:

  1. Open the file (2 Safety.fm).
  2. Create a new structured application (named "TEST") with no DTD, no read/write rules, etc, only template.
  3. Define structured application (TEST) for the document 2 Safety.fm.
  4. Export elements catalog as EDD.
  5. Save this EDD as a DTD.
  6. Save 2 Safety.fm as XML.
  7. Added line <!DOCTYPE chapter SYSTEM ".... DTD\test2.dtd"> in the XML file to declare the external DTD obtained at step 5.
  8. Tried importing XML file into FM but there's many elements appearing in red in the structure view, there's no formatting, and errors appear in the console (below are 2 of them translated from French, sorry about that) :

Error at line 34, column 59, Message : Empty invalid content for content model '(entry)+'.

Error at line 75, column 30, Message : Attribute '{http://www.w3.org/2000/xmlns/}fm' has not been declared for element 'module'.

Now I have a few questions :

  • I don't understand the error with undeclared http://www.w3.org/2000/xmlns/ attribute, can someone help me on this point ?
  • Is it now that I have to write the read/write rules to remove the errors above ? Is the StructureTools / New read write rules method the right method to create these rules ?
  • About formatting, will declare a template in the TEST application will be sufficient to get everything looking as in the FM file ?

Thank you very much in advance for your explanations and for enlightning me on this matter.

Regards.

TOPICS
Structured

Views

1.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Converting structured FM to DITA

New Here ,
Aug 18, 2015

Copy link to clipboard

Copied

Hello,

I have received structured FM file from a client and I would like to convert this file to DITA.

I have tried to achieve this several times by restarting from the beginning and by reading all the doc I could find, but I cannot manage to get my XML file.

Below are the steps I followed:

  1. Open the file (2 Safety.fm).
  2. Create a new structured application (named "TEST") with no DTD, no read/write rules, etc, only template.
  3. Define structured application (TEST) for the document 2 Safety.fm.
  4. Export elements catalog as EDD.
  5. Save this EDD as a DTD.
  6. Save 2 Safety.fm as XML.
  7. Added line <!DOCTYPE chapter SYSTEM ".... DTD\test2.dtd"> in the XML file to declare the external DTD obtained at step 5.
  8. Tried importing XML file into FM but there's many elements appearing in red in the structure view, there's no formatting, and errors appear in the console (below are 2 of them translated from French, sorry about that) :

Error at line 34, column 59, Message : Empty invalid content for content model '(entry)+'.

Error at line 75, column 30, Message : Attribute '{http://www.w3.org/2000/xmlns/}fm' has not been declared for element 'module'.

Now I have a few questions :

  • I don't understand the error with undeclared http://www.w3.org/2000/xmlns/ attribute, can someone help me on this point ?
  • Is it now that I have to write the read/write rules to remove the errors above ? Is the StructureTools / New read write rules method the right method to create these rules ?
  • About formatting, will declare a template in the TEST application will be sufficient to get everything looking as in the FM file ?

Thank you very much in advance for your explanations and for enlightning me on this matter.

Regards.

TOPICS
Structured

Views

1.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 18, 2015 0
New Here ,
Aug 18, 2015

Copy link to clipboard

Copied

One more question if I may ask, after another afternoon of trying to get a correct XML file :

The FM files that we got from the client are structured with these elements :

               chapter (root element)

                    module

                         topic.

                              ...

But I would like to get separate XML files for each topic, because an XML file including the content of a whole FM chapter would be quite useless.

What would be the best way to make separate XML files from the several topics existing in the FM chapter ? Should I make a DTD from the FM file that includes the chapter and module elements definition though ? Or cut the topics and insert them in new FM files, one by one, and then making DTD specifically for topics ?

Thanks again and have a great day/evening/night !

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 18, 2015 0
Participant ,
Aug 18, 2015

Copy link to clipboard

Copied

There are various previously recorded online seminars that you can review.

I know that there was a good one titled, "Unstructured To XML Series Part 2: Creating A FrameMaker Conversion Table," which might provide some tips for you. However, I am unable to find this series in the list (after trying several searches). Perhaps you will have better luck, or find an alternative series that helps you.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 18, 2015 0
New Here ,
Aug 19, 2015

Copy link to clipboard

Copied

Dear Eager Beager,

I could not find for the moment the seminar, but is it necessary to create a conversion table when starting with already structured documents ?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 19, 2015 0
Participant ,
Aug 19, 2015

Copy link to clipboard

Copied

Using a conversion table was a suggestion, or failing that, I thought that some of the other webinars might provide you with some inspiration.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 19, 2015 0
Mentor ,
Aug 19, 2015

Copy link to clipboard

Copied

olivierp,

This is an interesting challenge. If you already had your content in XML format, I would suggest that XSLT (outside of FrameMaker) would be the best approach. But since you do not, there may be better options. It is not simple to convert structured FM to XML and back, as you have found. It takes lots of trial and error, and certainly you will need some read/write rules, along with other corrections to your application.

My current thoughts are that you may be able to handle this better within FrameMaker, perhaps with some sort of plugin. I was thinking about Mif2Go, which supposedly can output DITA from binary FM files, although I have not ever used it myself:

Mif2Go Downloads | mif2go.com

That might be a place to start. Personally, I would consider using my FrameSLT plugin which can do work like XSLT, but all within FM on binary structured files. Of course, this would be easier for me because I naturally have such close familiarity with it.

FrameSLT - West Street Consulting

I think one of these two options might be your best approach, but I can't say for sure without analyzing your files. One thing to note... Mif2Go is free forever now, while FrameSLT is free for 30 days only.

Hope this helps.

Russ

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 19, 2015 0