Skip to main content
Participant
January 2, 2013
Question

Getting image name to the XML-file

  • January 2, 2013
  • 1 reply
  • 6194 views

Framemaker 9 and 11

Windows 7

Hi there

I am a brand new user to FM and my task is to go from old FM9 files to structured FM11 files and then save them as XML.

I have gotten so far that I can get reasonable good XML-files, but are having problems with the images.

If I right-click on an image in the strucured FM11 file and select Object properties, I can see the Referenced file info (name if the image and where it is located) .

Is there any way I can get that info into the XML-file?

When I use the "Structure Current Document" command, I get the following error message in the console:

Cannot export the FrameMaker graphic element (GRAPHIC) in the specified graphic format (EPSI).

Filter failed attempting to export a graphic as (EPSI).

In the XML-file I only get the following information about an image now:

<Figure>

<GRAPHIC entity = "GRAPHIC1" impsize = "0.586in 0.513in" impby = "copy"

    sideways = "0" impang = "0.000" xoffset = "0.000in"

    yoffset = "0.001in" position = "runin" align = "aleft" cropped = "0"

    float = "0" width = "0.787in" height = "0.622in" angle = "0.000"

    bloffset = "0.000in" nsoffset = "0.000in"/></Figure>

This topic has been closed for replies.

1 reply

Legend
January 2, 2013

Hi X143,

Are you attempting to convert the file format on export, or simply maintain a path to the original file for each graphic? If it is the latter, I thought that should be default behavior, although it's been a little while since I've had to mess with this. It looks like FM is trying to invoke some conversion filter and I also see an 'entity' attribute which suggests something else is going on. Can you post a sample of your read/write rules for the graphic element?

Russ

X143Author
Participant
January 2, 2013

Hi Russ and thanks for your swift response.

I am not trying to convert the image file format on export, just trying to maintain the path to each original imagefile.

Actually, it is sufficient if only the original image name would appear in the XML. The images are in .eps format.

I have not created any read/write rules of my own for the graphic elements or any other element.  Perhaps there are some new things I have to learn here?

In the conversion table I have written that the G: object should be wrapped inside a GRAPHIC element and then the GRAPHIC element inside a Figure element.

It seems like FM is counting the images in the order they appear "GRAPHIC1", "GRAPHIC2" and so on.

Legend
January 2, 2013

Hi X143,

If you have no read/write rules, I think that's where you need to start. The Structure Developers Guide (or whatever it is called now) has comprehensive information about this.

As an example, here is the definition of a graphic element in a rules file that I use:

element "image"

{

  is fm graphic element;

  writer facet default

  {

    specify size in in;

  }

  attribute "href" {

     is fm attribute "href";

     is fm property file;

  }

  attribute "align" {

    is fm property alignment;

    value "left" is fm property value align left;

    value "right" is fm property value align right;

    value "center" is fm property value align center;

  }

  attribute "impsize" is fm property import size;

  attribute "dpi" drop;

  attribute "impby" is fm property import by reference or copy;

  attribute "sideways" is fm property sideways;

  attribute "impang" is fm property import angle;

  attribute "xoffset" is fm property horizontal offset;

  attribute "yoffset" is fm property vertical offset;

  attribute "position" is fm property position;

  /* attribute "align" is fm property alignment; */

  attribute "cropped" is fm property cropped;

  attribute "float" is fm property floating;

  attribute "width" is fm property width;

  attribute "height" is fm property height;

  attribute "angle" is fm property angle;

  attribute "nsoffset" is fm property near-side offset;

}

I think the key parts for you are:

  is fm graphic element;

...and:

  attribute "href" {

     is fm attribute "href";

     is fm property file;

  }

In the XML generated with these rules, the path to a graphic is contained in an 'href' attribute. I guess I'm not really sure what the default behavior is without those rules... I suppose something like what you are seeing. Anyway, start looking into r/w rules. The answer should be there.

Russ

Message was edited by: Russ Ward (slight correction)