Format and Indent with menucascade

Post here questions and problems related to editing and publishing DITA content.
Eddie
Posts: 106
Joined: Wed Dec 18, 2013 3:07 am

Format and Indent with menucascade

Post 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.
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Format and Indent with menucascade

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Eddie
Posts: 106
Joined: Wed Dec 18, 2013 3:07 am

Re: Format and Indent with menucascade

Post by Eddie »

Thanks Radu,

I'll give that a go.

Cheers,

Eddie.
Post Reply