• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Restructure Structure using conversion table - FM2019

Enthusiast ,
Feb 09, 2022 Feb 09, 2022

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.

Views

346

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Enthusiast , Feb 09, 2022 Feb 09, 2022

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.

Votes

Translate

Translate
Community Expert , Feb 14, 2022 Feb 14, 2022

Then repeat for the NoteLineBelow. Note the updated XPath statement and Element action:

//Remarks/Notes[not(following-sibling::*[1][self::NoteLineBelow)]]

 

frameexpert_0-1644843969126.png

 

Votes

Translate

Translate
Enthusiast ,
Feb 09, 2022 Feb 09, 2022

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 14, 2022 Feb 14, 2022

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.

 

frameexpert_0-1644844609549.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 10, 2022 Feb 10, 2022

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 10, 2022 Feb 10, 2022

Copy link to clipboard

Copied

Thanks, I will look into FrameSLT.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 10, 2022 Feb 10, 2022

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2022 Feb 11, 2022

Copy link to clipboard

Copied

Quintin, Please post a couple of screenshots of the structure view with your before/after sample. Thank you. -Rick

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 13, 2022 Feb 13, 2022

Copy link to clipboard

Copied

Hi Rick,

Here is our current structure:

2022-02-14_09h22_12.png

 

Here is the structure we're changing to:

2022-02-14_09h23_21.png

The Notes Element remains unchanged.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 14, 2022 Feb 14, 2022

Copy link to clipboard

Copied

Here is what you need to find the elements with FrameSLT:

 

frameexpert_0-1644843421799.png

//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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 14, 2022 Feb 14, 2022

Copy link to clipboard

Copied

Now you can use FrameSLT to add the NoteLineAbove elements like this:

frameexpert_0-1644843795310.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 14, 2022 Feb 14, 2022

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)]]

 

frameexpert_0-1644843969126.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 14, 2022 Feb 14, 2022

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 14, 2022 Feb 14, 2022

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines