Copy link to clipboard
Copied
In our documents (structured), we use a Table Element (Notes) to insert notes. We've now decided to change the formatting of the notes, adding a line above and below the table. To achieve this, we've created a new Element (Remarks), which automatically inserts the LineBeforeNote, Notes and LineAfterNote Elements. When inserting the Remarks Element manually, we get the results we're after.
As you can image, we have several of these historical Notes that we need to convert to the new structure. I know we can use a Conversion Table to wrap the existing Notes Element in a Remarks Element. However, doing this results in the LineBeforeNote and LineAfterNote Elements missing. Is there a way to insert these as part of the Conversion, or do we have to go through all our documents and manually add the two additional elements?
We are not using XML or DITA - just Structured FM with an EDD.
Update: After some testing, it seems we can't re-run the Conversion Table again.
It's going to be tedius, but manually updating the documents looks like our only option.
Then repeat for the NoteLineBelow. Note the updated XPath statement and Element action:
//Remarks/Notes[not(following-sibling::*[1][self::NoteLineBelow)]]
Copy link to clipboard
Copied
Update: After some testing, it seems we can't re-run the Conversion Table again.
It's going to be tedius, but manually updating the documents looks like our only option.
Copy link to clipboard
Copied
You can run both actions at once with a Node Wizard Script. The screenshot shows the structure view of the included script file and the custom script that I added.
Copy link to clipboard
Copied
You should consider getting FrameSLT from West Street Consulting. It is a great tool for doing post-processing and clean up on structured documents. If you send me a FrameMaker document with a before/after sample of what you are trying to do, I will show you how to do it with FrameSLT. I will do it for free. Thanks.
Copy link to clipboard
Copied
Thanks, I will look into FrameSLT.
Copy link to clipboard
Copied
@frameexpertI downloaded the Trail and it looks like a very useful tool to have. I can see it will do what we need to do (Wrap our current Notes element in a Remarks element, etc.). The only thing I can't seem to see, is how to copy the value of an Attribute the same attribute on another element, e.g. the NoteType attribute on the Note could be assigned the value General, Tips, Reference, Warning or Important. The new Remarks element has the same attribute/values. I can't seem to find a way to assign the attribute value currently assigned against the NoteType for the Notes element to the NoteType attribute for the Remarks element. Is this not possible, or am I just missing something?
Thanks,
Quintin
Copy link to clipboard
Copied
Quintin, Please post a couple of screenshots of the structure view with your before/after sample. Thank you. -Rick
Copy link to clipboard
Copied
Hi Rick,
Here is our current structure:
Here is the structure we're changing to:
The Notes Element remains unchanged.
Copy link to clipboard
Copied
Here is what you need to find the elements with FrameSLT:
//Remarks/Notes[not(preceding-sibling::*[1][self::NoteLineAbove)]]
You can read it like this: "Find any Notes element that is an immediate child of a Remarks element."
The instructions in square brackets are called "predicates" or you can think of them that are filters. It says, "Only find Notes elements where the first preceding sibling is not a NoteLineAbove element." That is why only the first and third items will match.
Copy link to clipboard
Copied
Now you can use FrameSLT to add the NoteLineAbove elements like this:
Copy link to clipboard
Copied
Then repeat for the NoteLineBelow. Note the updated XPath statement and Element action:
//Remarks/Notes[not(following-sibling::*[1][self::NoteLineBelow)]]
Copy link to clipboard
Copied
Thanks Ric,
After going through the user guide (I'm one of those that actually read user guides ðŸ¤) I figured most of it out. I ended up creating two scripts - one to wrap all the Notes elements in Remarks elements, including updating the NoteType attribute on the Remarks element; one to add the lines above and below the Notes element. Both could potentially be in done in the same script. I just kept them separate for simplicity.
As this is a one-off exercise, I'm doing this using the demo version as I can't justify the cost of purchasing it to management right now. I can see the potential and benefit of FrameSLT for post-conversion updates, so will look at purchasing it later on.
Copy link to clipboard
Copied
FrameSLT's cost should be easy to justify because of the huge time savings you will incur. Give your managers a little before/after demo so they can see how much time you save.