Page 1 of 1

Format and Indent with menucascade

Posted: Fri Jun 05, 2015 8:40 am
by Eddie
Hello,

We are creating files with menucascade added to the Preserve space list of elements, but we have some existing files which were written before that, so we have both "styles" of menucascade, sometimes in the same file, like this:

Code: Select all


            <step>
<cmd>Click <menucascade><uicontrol>This</uicontrol><uicontrol>That</uicontrol><uicontrol>The Other</uicontrol></menucascade> and run.</cmd>
</step>

<step>
<cmd>Click <menucascade>
<uicontrol>This</uicontrol>
<uicontrol>That</uicontrol>
<uicontrol>The Other</uicontrol>
</menucascade> and run.</cmd>
</step>
Partly for consistency's sake and partly because we've been asked by translators, we're wondering if there is a way to use Format and Indent to make the non-inline menucascade display the same way as the inline menucascade. (Or is this something you could only do with Find and Replace?)

Cheers,
Eddie.

Re: Format and Indent with menucascade

Posted: Fri Jun 05, 2015 12:36 pm
by Radu
Hi Eddie,

Once you have set <menucascade> as space preserve, Oxygen will leave all white spaces in it exactly as they were.
Here's one possible way to do that using the batch format and indent:

1) Remove <menucascade> from list of space-preserve elements.\
2) In Preferences->"Editor / Format / XML" uncheck the "Indent inline elements" checkbox
3) In the same page uncheck the "Schema aware" option.
4) Possibly add to space preserve list DITA elements like codeblock because schema aware editing is OFF
5) Proceed with care, save the entire project to a separate location, after format and indent possibly apply a Tools->Compare Directories to see all changes.

Regards,
Radu

Re: Format and Indent with menucascade

Posted: Mon Jun 08, 2015 5:02 am
by Eddie
Thanks Radu,

I'll give that a go.

Cheers,

Eddie.