Skip to main content
Inspiring
June 16, 2011
Question

Problems with image attributes

  • June 16, 2011
  • 1 reply
  • 809 views

I'm not a native speaker but I give it a try 🙂

I tried to add attributes of my image element directly in the attributes window, for example I set the alignment to left. But the image is then still aligned center and it won't save the setting when I save the xml file. I looked throw my dtd and also the r/w rules but they are seem to be ok.

When I set the attributes in the anchored frame window everything works just fine.

My DTD looks like these (BildPosition is the alignment, BildAusrichtung is the position of the image):

<!ATTLIST Bild       src       CDATA     #IMPLIED
                     BildPosition  (below)   #IMPLIED
                     BildAusrichtung  (left)    #IMPLIED

...

--------

My r/w rules are these one:

/* Graphic element: Bild */
element "Bild" {
is fm graphic element;
writer facet default
{
specify size in cm;
}

fm property import by reference or copy value is "ref";

attribute "src"
{
is fm attribute "src";
is fm property file;
}
  attribute "BildPosition" {
    is fm attribute "BildPosition";      
    is fm property position;
     }

    attribute "BildAusrichtung" {
    is fm attribute "BildAusrichtung";
    is fm property alignment;
    value "left" is fm property value align left;
     }

....

------------

Has anyone an idea what I do wrong?

Thanks!

This topic has been closed for replies.

1 reply

Michael_Müller-Hillebrand
Legend
June 16, 2011

Hello Dokuteam1,

If you’s prefer help from colleagues in German you might want to use one of the resources listed here: https://groups.google.com/forum/#!forum/frameusers-de

There is no way to control the anchoring position or image alignment just by changing attribute values. Both properties are native FrameMaker properties and with the correct R/W rules they can be written to XML and read, but there is no way to control their setting via the EDD.

My solution for tasks like this is an event script, which »listens« to attribute changes. If one of those attribute values is changed I make the native FrameMaker setting via the script. E.g. if you would change your attribute BildPosition from "below" to "inline" the script would kick in an make the change as if you would have made it yourself in the Anchored Frame dialog. This of course requires FrameScript or FrameMaker 10 (with ExtendScript) or an FDK plug-in.

- Michael Müller-Hillebrand

Dokuteam1Author
Inspiring
June 17, 2011

Hi,

thanks for the tip with the german forum.

I wonder why this worked with DITA. When I create a normal DITA topic out of the menu I can change the attributes. Is there a script behind?

Thanks.

Greetings.

Michael_Müller-Hillebrand
Legend
June 17, 2011

Am 17.06.2011 um 09:16 schrieb Dokuteam1:

I wonder why this worked with DITA. When I create a normal DITA topic out of the menu I can change the attributes. Is there a script behind?

You did not mention the FrameMaker version you are working with, nor the DITA implementation you are talking about (Adobe-DITA, or DITA-FMx by Leximation). So it is hard to guess anything…

- Michael Müller-Hillebrand