Understanding the XML structure inside <menucascade> elements
Posted: Thu Dec 16, 2021 8:27 pm
This is just a curiosity, nothing is broken.
I noticed that when you create <menucascade> elements in the Oxygen editor, they are created in an XML block-element structure:
In the DITA-OT's HTML5 processing (xsl/merged2merged/merged-whitespaces.xsl), I see the following template that strips away whitespace text nodes inside <menucascade>:
But how does the Oxygen editor suppress this whitespace? If I author
it shows up as a solid block of text "ABC123XYZ" in the editor. I looked in the $OXYGEN_HOME/frameworks/dita/css directory for something that might apply to whitespace <menucascade> text nodes in the editor, but I didn't see anything.
I noticed that when you create <menucascade> elements in the Oxygen editor, they are created in an XML block-element structure:
Code: Select all
<p>Select <menucascade>
<uicontrol>Foo</uicontrol>
<uicontrol>Bar</uicontrol>
<uicontrol>Baz</uicontrol>
</menucascade> from the menus.</p>
Code: Select all
<!--
Remove whitespaces from element-only inline elements that are formatted by oXygen.
-->
<xsl:template match="*[contains(@class, ' ui-d/menucascade ')]">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="*"/>
</xsl:copy>
</xsl:template>
Code: Select all
<p>ABC<menucascade>
<uicontrol>123</uicontrol>
</menucascade>XYZ</p>