Skip to main content
January 11, 2011
Question

So Frustrated... Frame Drawing objects -> .mif converstion with r/w rules

  • January 11, 2011
  • 1 reply
  • 823 views

It has been a long time since I have spent this much time trying to figure out a function in FrameMaker.

Here is what I expect to happen.

I have an .xml file that I can open in FrameMaker and edit the graphics using the frame graphic tools.

Upon save, it would save the anchored frame as .mif using the entity name only with no counting.

I can reopen the xml file, make a change and upon save, the graphics are still named the same.

****Errors****

- entity names continue to number.

- I can save the xml file successfully but I can not read back into FrameMaker.

(VERY CURIOUS ERROR. When I try to read it back into FrameMaker it will not open and gives no error but at this point FrameMaker is completely crashed. Any file I try to open is a white sheet.)

Below are the details of my application. If anyone has time to pick through these details and me find a solution, it is greatly appreciated.

Margaret

FM9.0p255

XP Service Pack3

I open and save to test my application using a .xml file, not .fm

I have a structured file with anchored frames with frame drawings.

****XML Declaration*****

<!NOTATION mif     SYSTEM "">
<!ENTITY egmevtdelay SYSTEM "egmevtdelay.mif" NDATA mif>
<!ENTITY captpacedetect SYSTEM "captpacedetect.mif" NDATA mif>
<!ENTITY noncaptpacedetect SYSTEM "noncaptpacedetect.mif" NDATA mif>
<!ENTITY intratechgint SYSTEM "intratechgint.mif" NDATA mif>
<!ENTITY ccratechgint SYSTEM "ccratechgint.mif" NDATA mif>
<!ENTITY startupint SYSTEM "startupint.mif" NDATA mif>
<!ENTITY shutdownint SYSTEM "shutdownint.mif" NDATA mif>
<!ENTITY actvcap SYSTEM "actvcap.mif" NDATA mif>
<!ENTITY biphasicdel SYSTEM "biphasicdel.mif" NDATA mif>
<!ENTITY boostvcap SYSTEM "boostvcap.mif" NDATA mif>

****XML Graphic Element****

<GRAPHIC entity = "egmevtdelay" position = "below" align = "acenter"
    cropped = "0" float = "0" width = "7.000in" height = "4.160in"
    angle = "0.000" nsoffset = "0.000in"/>

****structapps.fm*****

In the structapps.fm file I have also defined (with same definitions as above) Entities in the XMLApplication Entities -> Entity -> EntityName & FileName

****template for xml application****

On the reference page I have filled out the Entity Declarations, List of Processing Instructions(PI)

mif is the Notation declaration and I have the Name, Type, System, and Notation filled out in the Entity Declaration.

*****r/w rules*****

element "GRAPHIC" {
  is fm graphic element;
   writer anchored frame export to file "$(entity).mif"
    as "MIF";
}

This topic has been closed for replies.

1 reply

Michael_Müller-Hillebrand
Legend
January 12, 2011

Margaret,

FrameMaker is trying not to ruin your files. The MIF entities are external resources, not under FrameMaker’s control. So the product does not overwrite existing file names (in addition you would feel bugged, if it asked you a zillion times).

You could delete the files after having opened the XML file, hey are no longer needed, not like external graphics. The MIF segments are just incorporated in the opened document. This could be automated with some scripting/programming if necessary.

Regarding the crash: Does reading the XML work OK if you quit and restart FrameMaker before trying it?

- Michael

January 12, 2011

The xml file does not open in FM after I save and close it.

I believe I must be missing a read rule or "ref" statement. My file exports fine but does not import fine.

If I follow the logic.

I have framemaker illustrations.

They are saved as .mif files on export.

The .mif files are utilizing the entity name+.mif

Now how does FrameMaker read the .xml file back in and bring back the Framemaker illustrations? The application is now looking for a .mif file.

Here lies my problem... I think.

My other question about counting the .mif files. Round triping the xml file with graphics and storing in a repository is very difficult if always creating new graphics. I do believe I can work a system out though. I am more concerned with the above issue. I know I am missing something on the import. Perhaps you can't do what I want it to do.

Thank you Michael!

Michael_Müller-Hillebrand
Legend
January 12, 2011

Margaret,

As I understand it: You have file A.xml with references to a number of MIF entities. This file opens fine in FrameMaker.

Now you save this file in another folder (to avoid any name changes, parallel to the original folder) as B.xml. This is working as you reported.

To find out why B.xml cannot be opened in FrameMaker you would have to compare A.xml to B.xml.

- Michael