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!
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.
i know, but i need to realize a authoring procedure without no import/export actions!
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!
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.
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!
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?
I am assuming that the following structure is what you create:
Then you want the EDD to add an attribute to parent_element ONLY if it contains a marker_element; something like this:
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.
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.