Skip to main content
Participating Frequently
February 22, 2012
Question

Framemaker 10 EDD syntax for automatically set attribute values

  • February 22, 2012
  • 5 replies
  • 2744 views

Hi all,

it is necessary to set one or more attribute values of a parent element automatically only by exist or not exist conditions of an spezified child element!

Please help!

This topic has been closed for replies.

5 replies

StanleyXIAuthor
Participating Frequently
February 23, 2012

Hi Van,

that's exactly the point. I have the element with an attribute already configured but it was simply forgotten to change attribute value in the parent element by the authoring team, the filter did not work so right.

Ok, thanks all for your statements.

Marco

StanleyXIAuthor
Participating Frequently
February 22, 2012

Hi Michael,

the meaning is to provide the possibility to set marking elements if the workflow stopps cause missing informations or wrong informations FOR EXAMPLE!

Marco

Van Kurtz
Inspiring
February 22, 2012

Marco,

I am assuming that the following structure is what you create:

<parent_element>

     <child>...</child>

     <marker_element/>

     .

     .

     .

</parent_element>

Then you want the EDD to add an attribute to parent_element ONLY if it contains a marker_element; something like this:

<parent_element marker_attribute="SET">

     <child>...</child>

     <marker_element/>

     .

     .

     .

</parent_element>

Is the above what you are trying to do?

If so, then in the EDD, add marker_attribute as an attribute of parent_element. Then the author can set the attribute when needed. If the parent element can be one of several elements, add the marker_attribute to all of them. Then you can filter by this attribute.

Setting an attribute is as easy for an author to do as adding a marker element.

If this is NOT what you are trying to do, please clarify.

Van

StanleyXIAuthor
Participating Frequently
February 22, 2012

I need an attribute in a structured document which is intended solely as a marker (stop authoring cause wrong or missing informations etc). This should, of course, just put in the structure where the problem occurs. It is obviously not enough to filter by that (marker) element cause i need the whole context of this subchapter for example. To reflect the context, I would like use the next higher element (for example subchapter) as filter by attribute which be activated only if a (marker) element are added as child. This is the task! I hope it is understandable!

kind regards

Michael_Müller-Hillebrand
Legend
February 22, 2012

Stanley,

Unfortunately it is still foggy (to me).

What do you mean with "wrong information" and "missing information"? Maybe you can create some pseudo-XML examples to show us the situation and what should happen?

- Michael

Michael_Müller-Hillebrand
Legend
February 22, 2012

Stanley,

the EDD offers no rules to act on the content of an element. The context rules examine siblings and ancestors and their attributes. The main reason for what looks like a restriction is performance. All rules of a document would have to be evaluated for every keystroke if they might have a dependency on some content.

There is also no rule to create content, and the value of an attribute is content.

You can – of course – do this by custom programming (script or FDK) by looking for the event of inserting an element.

You have described only a technical requirement, please describe your use case. We, the community, may come up with an easier solution for you.

- Michael

Inspiring
February 22, 2012

One straightforward solution is to write out the fm document to xml and use Frame's export (or import..) XSL-transformation to add the attribute values based on child element conditions and then open the xml back to framemaker.

If you have a working XML-application in Framemaker, i.e. you can save your document to xml and open the that back to Frame.. XSL script should be pretty easy job.

StanleyXIAuthor
Participating Frequently
February 22, 2012

Hello MarttiP,

i know, but i need to realize a authoring procedure without no import/export actions!

Background:

I have create a edd (dtd) of authoring maintenance manuals and it works with the exception of irregularly framemaker crashes! Additional we need an element to set markings only helpful for the redakteurs. To get an helpful filter for this element it is necessary to separate the parent element to get the concerning content (show only the element for marking is not enough). I have try the change a specific attribut value of the parent element by insert the child to get the possibility to filter the concerning chapter (parent area)!

That must be possible!!!

Sorry for my expression, im not a native english speaker!

Inspiring
February 22, 2012

Ah, got it..;)

Michael is right, EDD does not provide hooks enough to do what you need, scripting or FDK coding is the only solution.

BR, Martti