<emph> tags

Sometimes the <emph> tag is inserted before and after all other XML tags like this (from Help):

    <variable id="tabelleinhalte">Open a spreadsheet document, choose
    <emph><switchinline select="sys"><caseinline
    select="MAC">%PRODUCTNAME -
    Preferences</caseinline><defaultinline>Tools -
    Options</defaultinline></switchinline> - %PRODUCTNAME Calc -
    View</emph></variable>

Other times before and after each emphasized word(s) like this:

    <variable id="tabelleinhalte">Open a spreadsheet document, choose
    <switchinline select="sys"><caseinline
    select="MAC"><emph>%PRODUCTNAME -
    Preferences</emph></caseinline><defaultinline><emph>Tools -
    Options</emph></defaultinline></switchinline><emph> - %PRODUCTNAME
    Calc - View</emph></variable>

Does it matter which method I am using?

To me it looks like both methods results in the same text in the end help text. *
*In Windows/Linux both methods results in the text:

    Open a spreadsheet document, choose *Tools - Options - LibreOffice
    Calc - View*

Kolbjørn

Sometimes the <emph> tag is inserted before and after all other XML tags
like this (from Help):

   <variable id="tabelleinhalte">Open a spreadsheet document, choose
   <emph><switchinline select="sys">[…]

This is invalid according to document syntax definition. switchinline
is not listed as allowed subelement of "emph".

Other times before and after each emphasized word(s) like this:

   <variable id="tabelleinhalte">Open a spreadsheet document, choose
   <switchinline select="sys"><caseinline
   select="MAC"><emph>%PRODUCTNAME -
   Preferences</emph></caseinline><defaultinline><emph>Tools -
   Options</emph></defaultinline></switchinline><emph> - %PRODUCTNAME
   Calc - View</emph></variable>

This is valid.

Does it matter which method I am using?

Yes. Some are valid combinations according to the helpfile
specification, others are invalid.

The specification is here:
https://cgit.freedesktop.org/libreoffice/help/tree/helpers/xmlhelp.dtd

https://cgit.freedesktop.org/libreoffice/help/tree/helpers/xmlhelp.dtd#n91

<!ELEMENT emph (#PCDATA | item | comment | help-id-missing)*>

<emph> can contain one or more of PCDATA (i.e. actual text content),
<item> tags, <comment> tags and <help-id-missing tags>, but no other
elements, specifically switchinline is not listed.

ciao
Christian

Thank you.

I did not remembered to check the syntax definition :frowning: .
Kolbjørn

Den 06.04.2016 17:19, Christian Lohmaier skreiv: