Copy link to clipboard
Copied
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>
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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)
Copy link to clipboard
Copied
Ok thanks a lot. I will look into and see if I can solve it.
Copy link to clipboard
Copied
Hi,
You wrote by email:
>>>>>>>>>>>
>>>>>>>>>>
Hi again
Yesterday I managed to get the following image info to the XML file:
<Figure><graphic xml:link = "locator" href = "graphic1.gif"
show = "embed" actuate = "auto"></graphic></Figure>
and FM exported the .eps images as .gif-files. It was actually sufficient info, but unfortunately I started to experiment further and I lost what I previously had done.
Now the r/w rules looks like this:
element "image"
{
is fm element "graphic";
attribute "xlink:href" is fm attribute "href";
}
and when I save to XML, FrameMaker exports images as .mif files and the image info in the XML-file looks like this again:
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
>>>>>>>>>>>>
>>>>>>>>>>>
My response:
Did you try this rule?
attribute "xlink:href" is fm property file;
Also, are colons legal in attribute names?
Also, looking further at the structure dev guide, it says this:
"Creating graphic files on export
"For graphics imported by reference, the software uses the same file for the markup
document as it does for the FrameMaker document. On export, it creates new files for graphic and equation elements that meet any of the following conditions:
"•The graphic file was imported by copy.
"•The user changed the graphic content in any way while editing the document in
FrameMaker. This includes adding graphic content via the graphics palette, or importing
an additional file into the anchored frame. Note that the user may delete the existing
graphic file and import another one. If the new file matches a file in the DTD’s entity
declarations, or it matches a file on the Entity Declarations reference page, the exported markup will refer to this newly corresponding entity."
Do you have some graphics that are single, imported facets and others that are not?
Those are just some quick notes/clues. I'm no expert on the various permutations on graphic export. In my XML, I strictly maintain single-facet frames with an imported graphic. With the rule I showed you earlier, I always get an element exported with a reference to the graphic path.
Russ
Copy link to clipboard
Copied
Hi Russ
I deleted my last posting today from the website because I later remembered what I did yesterday, but it seems like you have received it by mail also. Yesterday I had selected a Structured Application shipped with FM, instead of my own, when saving to XML. And it looked better...Now it links to both .gif images and the .eps images. The gif images are somehow exported from FM and the links to the .eps files goes to the folder where they are.
I'm just a beginner with FM, but it seems like the person who created the FM 9 documents handled the images in two different ways, as you implied. You use a word "facets" that I don't understand (English is not my first language), and Google translate is not much of a help in this case.
Anyhow, the situation is that I need only to take the XML to a "good enough" - level, then I will pass it on to an XSLT-expert, who will adjust it so it works with our own DTD. It doesn not matter if there are some errors in the XML, as long as they are consistent. He can adjust for that. Of course I want the XML to be as good as possible before I hand it over to him, but I don't have unlimited time.
By the way, I think you are doing a great job in answering questions on these forums. Thanks a lot.
X143
Copy link to clipboard
Copied
Hi X,
I thought maybe you had accidently emailed me in private somehow by accident. Sorry about that.
I'm glad you are getting it figured out. For a newcomer, you are doing apparently quite well in a rather advanced area of the software.
The word "facet" is a bit difficult for even a native English speaker. It means something like: "an instance of some graphic in some particular format." For example, I guess an anchored frame with a single imported JPG image would be said to contain a single facet. If it is an EPS with a TIFF preview, I think that would mean that the frame contains two facets. Again, though, I have to claim no expertise. Anyone with expertise is welcome to chime in and prove how little I know.
Russ