Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Preserving Graphics with Conversion Tables

New Here ,
Oct 24, 2008 Oct 24, 2008

Copy link to clipboard

Copied

Hi All,

Is there a way to preserve the file names of images when converting unstructured Frame documents to structured Frame? I know how to wrap an appropriate unstructured Frame format to an element, such as <graphic> or <image>, but I need the href attribute to be set to the name of the image file. Is it possible? I haven't found any information in the Adobe Structure Application Developer Reference Guide...

Thanks in advance,
Alex
TOPICS
Structured

Views

661
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
community guidelines
Mentor ,
Oct 24, 2008 Oct 24, 2008

Copy link to clipboard

Copied

Alex,

It's not possible with a conversion table. A referenced graphic file path is a hidden property. Is there a reason you need the path in the href attribute? Nothing is lost when you convert to structured docs, the graphics still work the same as they always have.

When you save to XML, you can have the file path saved to an attribute. I don't know if this is relevant to your current situation, though.

Russ

Votes

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
community guidelines
New Here ,
Oct 24, 2008 Oct 24, 2008

Copy link to clipboard

Copied

Hi Russ,

Thank you for the prompt reply. The reason why I need it is because my target is XML files, not FrameMaker documents. These XML files will be processed by another application.

Your mentioning of the hidden attribute helped me make a guess and find a solution. I updated the read/write rules so they look as follows:

element "image"
{
is fm element "GRAPHIC";
attribute "href" is fm property file;
}

Now the path from the hidden file attribute is put into the href attribute as I need.

Thanks!
Alex

Votes

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
community guidelines
Community Beginner ,
Oct 24, 2008 Oct 24, 2008

Copy link to clipboard

Copied

Alex,

This may not help, but see Chapter 19, Translating Graphics and Equations, and Appendix A, Conversion Tables, in the Developer reference.

In my case, the conversion table assigns the Graphic element to a graphic object by putting G: (capital G and colon) in the first column of the conversion table and Graphic (the name of the element) in the second column, nothing in the third column. There is no need to assign the href of the graphic to an attribute; Frame stores the location of the graphic internally in its representation of the Graphic element.

Note however, that I do not export the structured document to XML or do XML round-tripping. If you need to do that, you need to find a way to assign the location to an attribute. I do not do that.

Chapter 19 seems to say that IF you name your attributes according to a default set, then Frame will assign the properties of the graphic to these attributes when you export to XML. For example, the attribute that holds the location of the graphic file is named entity, not href. So, maybe changing the name of your attribute to entity may do the trick, if you are exporting to XML.

I HAVE DONE, however, imported an XML file into structured Frame. In this case, the graphic elements each has an attribute named entity that holds the location of the graphic file. The import works fine, EVEN THOUGH, my EDD does not define the Graphic element as having an attribute named entity.

I admit that this is not a complete answer to your question, but I hope it helps.

Van

Votes

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
community guidelines
New Here ,
Oct 24, 2008 Oct 24, 2008

Copy link to clipboard

Copied

Hi Van,

Thank you for your help! Yes, I realized that Frame stores the location of the graphic in a hidden attribute called file and defined in the read/write rules for the image element that:

attribute "href" is fm property file;

Thanks!

Alex

Votes

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
community guidelines
Community Beginner ,
Oct 24, 2008 Oct 24, 2008

Copy link to clipboard

Copied

Alex,

The attribute is entity, NOT file.

NOTE that read/write rules apply to import and export, NOT conversion from unstructured to structured. The latter requires only a conversion table.

Van

Votes

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
community guidelines
Mentor ,
Oct 24, 2008 Oct 24, 2008

Copy link to clipboard

Copied

LATEST
Hi Alex,

I was indeed referring to that read/write rule. I'm sorry I wasn't more specific... I didn't mean to make you guess :)

Russ

Votes

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
community guidelines