Skip to main content
Participating Frequently
May 26, 2015
Answered

Export Change Bars (and other formats) in Structured Framemaker to XML

  • May 26, 2015
  • 1 reply
  • 978 views

Anyone know if there is a way to export Change Bars and other unstructured styling to XML via processing instructions? I've set OutputAllTextWithPIs in my Application, and I see track changes annotations, but no change bar PI's. Seems like this would be essential to roundtripping, but I haven't found any way to do it. Any help is greatly appreciated!

-bpopp

This topic has been closed for replies.
Correct answer ScottPrentice

It depends on how the change bar format was applied. If via character tags, it won't export as a PI. If you use conditional tagging, and define the styling as change bar, it will. But .. PIs are best to avoid in XML .. it'll just cause bloat. Also conditional tagging PIs in FM can cause problems down the road so it's best to avoid (IMHO).

A better approach is to use attributes on elements, then have the change bars applied as formatting via EDD context rules. In DITA, there's the status attribute, which can be used for this purpose.

Remember that in XML, you want to eliminate "formatting", but rather store information as metadata (attributes) that can be applied in various ways through a publishing process (structure applications, etc.)

Cheers,

...scott

1 reply

ScottPrentice
ScottPrenticeCorrect answer
Inspiring
May 27, 2015

It depends on how the change bar format was applied. If via character tags, it won't export as a PI. If you use conditional tagging, and define the styling as change bar, it will. But .. PIs are best to avoid in XML .. it'll just cause bloat. Also conditional tagging PIs in FM can cause problems down the road so it's best to avoid (IMHO).

A better approach is to use attributes on elements, then have the change bars applied as formatting via EDD context rules. In DITA, there's the status attribute, which can be used for this purpose.

Remember that in XML, you want to eliminate "formatting", but rather store information as metadata (attributes) that can be applied in various ways through a publishing process (structure applications, etc.)

Cheers,

...scott

bdpoppAuthor
Participating Frequently
May 27, 2015

Thanks Scott. That's bad news. I understand the warnings, but I'm essentially trying to use FO to render a legacy book that has had changes extensively styled with change bars and paragraph styling. They do also set an attribute, but it would be impossible to replicate the look of the original book with this since the writer has styled individually modified words and sentences in order to show specifically what changed in a large block of text. Using the attribute, the resulting change bars would end up spanning multiple pages when only a few words might have been changed. Elements could be used to wrap the specific changes, but this would be complicated since these changes often span multiple paragraphs or even sections. Many XML editors (including FM) get around this complexity by using PI's to markup changes that may not end up being syntactically valid. Right or wrong, I don't really understand why Adobe wouldn't at least allow for something similar w/ character tags.

Regardless, I very much appreciate the information.

Brian

ScottPrentice
Inspiring
May 27, 2015

Hi Brian...

Yeah .. if you need to mark up the XML below the element level then you will need to use PIs. That is what FM (and other XML editors) use for change tracking. FM's change tracking is really just hijacked conditional tagging, and conditions are the only thing that'll round-trip as PIs. Your best bet is to create a script (ExtendScript should work) to map your character tags to conditions.

I'm confused though .. do you already have XML, or are you converting from unstructured FM to XML? If the latter, you could map the content tagged with character styles that mark changes to a special element that you then swap with PIs at some point in the conversion process. Or is it that you've got structured "binary" FM files that you're exporting to XML? And why are you using FO to render the book when you've already got the content in a tool that will produce far better output (and much easier) than FO?

You don't need to answer these questions, if you're set on your process .. just wondering!

Cheers,

...scott