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

XML comments in Structured Frame 17, how to manage

Explorer ,
May 04, 2023 May 04, 2023

Copy link to clipboard

Copied

After checking in both the Structured Frame reference and user guides, I got the impression that the default handling of comments would be adequate for my needs, and it would not be necessary to create additional import/export rules (such as I already have for cross references). This does not seem to be the case.

I have an XML document which is conformant with my XML schema and with the associated EDD. I added an XML comment in the middle of the file with a text editor:

<!-- this is a test comment -->

and loaded the file into FrameMaker. There is a pre-processing XSL script - which copies comments through - and a post-processing script which does likewise.

Viewing the document in FrameMaker I could not see the comment in either the structure view or the document view, and if I ran Find looking for markers it did not find any comments.

I inserted a marker, type comment, with marker text "this is a Frame comment", and created it. I also made a separate edit to the document content so I could verify that the document had been saved with my changes. I could not see any indication that I had added a comment, and another Find > Marker still did not find any comments 

Then I saved the document: it had my text edit, it retained my original comment, it did not have the Frame comment.

I would appreciate some guidance on (a) how to see the incoming XML comments in FrameMaker (b) how to add similar comments in the Frame session and have them saved in the XML document on exit.

It's possible that I missed something crucial in the developers guide, but I have checked again and come to the same conclusion as before.

Cheers, T

TOPICS
Structured

Views

405

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 1 Correct answer

Community Expert , May 04, 2023 May 04, 2023

Choose View > Pods > Markers to see the Markers Pod (Panel in FrameMaker 2020 or above). When you click on a Marker in the Pod, it will scroll the document to the Marker location. This is about the best you can do.

Votes

Translate

Translate
Community Expert ,
May 04, 2023 May 04, 2023

Copy link to clipboard

Copied

One possibility that I haven't tested: In your import XSL, you could transform your comments into processing-instructions that will create a FrameMaker marker. Here is an example processing-instruction that will create a Comment marker:

 

<?FM MARKER [Comment] This is the comment?>

 

The markers will NOT show in the Structure View but because they are saved as processing-instructions, they should survive on input/output. You can transform them into XML comments with your export XSL transform.

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
Explorer ,
May 04, 2023 May 04, 2023

Copy link to clipboard

Copied

Thank you frameexpert, whoever you are, you have solved half of the problem (what I thought would be the trickier half).

So I can turn xml comments into PI's, and I have successfully turned an inserted comment marker back into an xml comment, and everything roundtrips.

However... the main point of these comments is so that the technical author will see them when they are editing, and at the moment they are just invisible. Is there a way to expose them to the edit session?

cheers, T

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 ,
May 04, 2023 May 04, 2023

Copy link to clipboard

Copied

Choose View > Pods > Markers to see the Markers Pod (Panel in FrameMaker 2020 or above). When you click on a Marker in the Pod, it will scroll the document to the Marker location. This is about the best you can do.

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
Explorer ,
May 05, 2023 May 05, 2023

Copy link to clipboard

Copied

Hi

Yes, this is not really adequate. I have resorted to translating comments into an element on load, doing the reverse on save, and doing my best to format the element in such a way that it can't be mistaken for real content. The next step is to see what the technical author thinks.

But you have answered my question 🙂 so thank you.

cheers, T

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
Explorer ,
May 05, 2023 May 05, 2023

Copy link to clipboard

Copied

Hi Trevor,

Is FM your primary XML editor in which you create and maintain content? If so, I wonder if the AXCM tool would work for you. It's a conditionalized text tool that could potentially be used for comments too. From the presentation:

"Storage of an unlimited amount of non-publishable material (such as authoring comments and draft content) in your source files, with a guarantee that it will always be removed before publishing"

Haven't used it myself, so testing would be necessary ofcourse.

AXCM Plugin - West Street Consulting

/Mats

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
Explorer ,
May 05, 2023 May 05, 2023

Copy link to clipboard

Copied

Frame is the primary editing tool of the technical author but other tools are also in use. I tend to just use a text editor with an xml-aware mode.

Thanks for the link, I'll take a look.

cheers, T

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
Advisor ,
May 09, 2023 May 09, 2023

Copy link to clipboard

Copied

   Another approach is to represent the comments in FrameMaker as elements instead of markers. Since you are using XSLT already, it should be trivial to change comments to elements when you open an XML document and to change those elements back to comments when you save a FrameMaker document as XML. You can format such comments as you prefer, adding a prefix such as "Comment:", changing color, making them text ranges within a paragraph, or using a unique paragraph format if they fall between paragraphs.

   Users can choose whether to hide or show the comments. If the syntax of the comments identifies categories such as the author of the comment, version of the document or whatever it describes, or date the comment was written, users can selectively display some but not all comments.

   These options come with Filter by Attribute, which allows a document to:

1. Show or hide an element, assign a color, or assign a condition tag based on the values of one or more of its attributes

2. Change the settings based on an applicable attribute expression

   As its name implies, this feature does require an attribute to be defined. If you don't need the attribute except to use Filter by Attribute, you can define an attribute which could be called, say, CommentDisplay, which is a choice attribute with one possible value, perhaps also called CommentDisplay. Make the attribute optional with the only possible value the default. And make it Hidden so that users never need to see it.

   Then in the template use View > Filter by Attribute. This dialog box supports two functions: editing filter expressions and applying one of the defined filter expressions. As the maintainer of the template, you would edit the filter expressions. In the simple case where you want either to show all comments or hide them all, you would define two expressions. For example, you might define an expression called Show to show them all and one called Hide to hide them all. Users can then use the same dialog box to choose one of the two expressions.

       --Lynne

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
Explorer ,
May 09, 2023 May 09, 2023

Copy link to clipboard

Copied

Hi

Thank you for this. As you suggest, I am already folding the comments to an element (authornote) on load, and turning them back into comments on save. The comments are displayed rather prominently for my liking but could not possibly be mistaken for normal document flow 🙂

I'd have liked to put them in a box in the margin but that exceeded my capabilities.

Depending on the reaction of the technical authors, I expected to have to return to this question to find out if there was any way of making the comments appear and disappear. You have nicely pre-empted that, so thank you again!

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
Advisor ,
May 09, 2023 May 09, 2023

Copy link to clipboard

Copied

LATEST

A box is a table with one row and one column. If you are not using sideheads, you could put that table in a sidehead. If you are using sideheads, you could put it in an anchored frame, but the programming is more complicated. You could use XSLT to create a MIF file. You could use the FDK during import to move the table into the anchored frame. Or script moving an imported table into an anchored frame.

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