Skip to main content
convextech67
Known Participant
July 11, 2012
Question

Type mismatch for the element FrameMaker element (graphic)

  • July 11, 2012
  • 1 reply
  • 2266 views

Now that I'm moving along on the formatting portion of this manual (or so I think - ha), I need to start bringing in the graphics to make sure they are all there, so I can get the illustrator going on that end. I've looked at threads everywhere I could find regarding graphic boardno and using the read/write rules to tell FrameMaker what to do with the graphic, and nothing works. I keep getting an error that says, "type mismatch for the element FrameMaker element (graphic). The type defined by the read/write rules is different from thet defined in the template."

I created this rw file from scratch out of FM 10. I've copied several different iterations that I've found all over the place. Right now my rw file has this:

element "graphic" {

is fm graphic element;

attribute "boardno" {

is fm property entity;

is fm attribute;

}

}

This topic has been closed for replies.

1 reply

Van Kurtz
Inspiring
July 11, 2012

It is not clear what you are trying to do, but read/write rules are only really necessary when you are reading in or writing out XML. If you are importing files within FrameMaker, FrameMaker does not use or reference your read/write file.

ALSO, note that you should not try to manipulate graphics or import them (within FrameMaker) using the attributes of your graphic element. Within FrameMaker manage your graphics as you would in unstructured Framemaker.

In any event, here is the relevant part from my read/write rules. The dpi drop statement and the write facet statement are there to get XML output with the graphic file dimensions in points rather than dpi; you likely may not need these statements.

element "Graphic" {

    is fm graphic element;

    attribute "file" is fm property file;

    attribute "dpi" drop;

    writer facet default specify size in pt;

}

Here is my definition of the Graphic element in my EDD. Note that it does not specify the type of the graphic. It simply brings up a dialog to find the graphic file to import.

Element (Graphic): Graphic

Initial graphic element format

In all contexts.

Insert imported graphic file.

In structured FrameMaker, graphics (among other objects) have special handling. See the Structured Applications Guide for the details.

Hope this helps,

Van

convextech67
Known Participant
July 11, 2012

From what I understand from the Structured FM Guides that I have read, which, by the way, contradict each other in the examples they give, I have to have an EDD to open the valid XML in FrameMaker. In order to get FM to display the graphic (they aren't displaying without the rw file), I was told I have to specify a rw rule to tell FM to display the boardno (the reference to the entity) as an entityref. I tried that, amongst other things, and so far I have been unable to get my graphics to display.

If I were to treat them as an unstructured FM file, that would mean manually importing the graphics by reference, and according to your EDD, that's exactly what you are doing; I am not going to import each of these files manually, otherwise, why am I bothering using Structured FrameMaker with an EDD at all? I would just use the old unstructured FrameMaker files this manual was originally built in and go from there. But we want our data in XML so that it can be further converted into an IETM.

At any rate, thanks for the reply.

Van Kurtz
Inspiring
July 13, 2012

I have the application already set up; I did that first. However, whenever new changes have been made to the EDD, the EDD must be imported back into the template, and whenever I've made new formatting changes to the imported document, those formats must be imported into the template as well. FrameMaker does not automatically assume that any changes I have made should be added to the template, and the template and EDD's definitions should match.

And btw, when you keep saying "see the guide or see the reference for details", I don't know about anyone else, but when I resort to asking questions on a forum, it's because I've been through the guide and the references and I need someone's real-world experience. Just saying

Have a great weekend!


However, whenever new changes have been made to the EDD, the EDD must be imported back into the template, and whenever I've made new formatting changes to the imported document, those formats must be imported into the template as well. FrameMaker does not automatically assume that any changes I have made should be added to the template, and the template and EDD's definitions should match.

When you open an XML file, the structure application creates a NEW document from the template file, leaving the template file as a blank document. In my opinion, this is what one wants. This keeps the template as a clean starting point. As you know, the formats and the EDD are also in the new document; however, the new document is not connected to the template. Any formatting changes one makes in the new document have to be imported back into the template IF you want those changes to be included with the template.

When you make changes to the EDD, you are making those changes in an EDD document that is separate from the template. Those changes have to be imported back into the template. I do not see how it could be otherwise. For example, you cannot edit the EDD in the new document nor in the template; the EDD is a separate document that can only be edited in that separate document and then imported into the template and any existing document whose EDD you want to update.

And btw, when you keep saying "see the guide or see the reference for details", I don't know about anyone else, but when I resort to asking questions on a forum, it's because I've been through the guide and the references and I need someone's real-world experience. Just saying

Generally, I state this because I do not want to repeat the details in my post, details that the reader can find in the guides.

On the other hand, I have seen users on this forum who clearly do not read the guides and references. They want someone just to give them step-by-step instructions to do what they want without having to think through the solution or read the guides. As you state, you are not one of those.

Van