2 Replies Latest reply on Jul 29, 2012 9:37 PM by giang tran

    menuchoice, guimenu, guimenuitem, and guisubmenu?

    giang tran Newbie

      Hello, according to your example in https://hudson.jboss.org/jenkins/job/PressGang_Documentation_Guide/lastSuccessfulBuild/artifact/target/docbook/publish/en-US/html_single/index.html#d0e99 as follows:

      "Choose <menuchoice><guimenu>System</guimenu><guimenuitem>Preferences</guimenuitem><guisubmenu>Mouse</guisubmenu></menuchoice> from the main menu bar ..."

       

      --> In this example, <guimenuitem> precedes <guisubmenu> but according to the usage in http://www.docbook.org/tdg/en/html/guimenuitem.html, <guimenuitem> should follow right after <guisubmenu>. Can u explain for me to understand why so?

       

      For most of your explanation, I think it is so good.

       

       

      Thanks,

      Giang

        • 1. Re: menuchoice, guimenu, guimenuitem, and guisubmenu?
          Jared Morgan Newbie

          Hi Giang

           

          Thanks for taking a close look at the PressGang Documentation Guide.

           

          I've had a close look at the DocBook usage as well (it's been a while since I reviewed this section) and I think you've got a point with your observation. Long answer below.

           

          I'll post the descriptions of each element below for context (in case anyone else reads this question in the future):

           

          • <guimenu>
            GUIMenu identifies a menu name in a graphical user interface. In particular, this is distinct from a menu item (GUIMenuItem), which is terminal, and a submenu (GUISubmenu), which occurs as a selection from a menu.
          • <guimenuitem>
            GUIMenuItem identifies a terminal selection from a menu in a graphical user interface. In particular, this is distinct from a menu (GUIMenu) and a submenu (GUISubmenu). The distinction between a GUIMenuItem and a GUISubmenu is simply whether or not the selection is terminal or leads to an additional submenu.
          • <submenu>
            The name of a submenu in a graphical user interface is identified by the GUISubmenu element. A submenu is a menu invoked from another menu that leads either to terminal items (GUIMenuItems) or additional submenus.

           

          "Choose <menuchoice><guimenu>System</guimenu><guimenuitem>Preferences</guimenuitem><guisubmenu>Mouse</guisubmenu></menuchoice> from the main menu bar ..."

           

          This example was from "back in the day" when GNOME 2 was the desktop on fedora. 

           

          Withouth the markup, the Menu transition is System>Preferences>Mouse

           

          System is the top level menu, so <guimenu> is the correct choice there.

           

          Preferences is not classed as a "terminal" menu, because there are menu choices below this level. I would think that Preferences should be tagged as <guisubmenu> in this instance.

           

          Mouse is a terminal menu choice, so I think this should be tagged as <guimenuitem>.

           

          The corrected sentence would change from:

           

          "Choose <menuchoice><guimenu>System</guimenu><guimenuitem>Preferences</guimenuitem><guisubmenu>Mouse</guisubmenu></menuchoice> from the main menu bar ..."

           

          to

           

          Choose <menuchoice><guimenu>System</guimenu><guisubmenu>Preferences</guisubmenu><guimenuitem>Mouse</guimenuitem></menuchoice> from the main menu bar ...

           

            NOTE In publican this does not break validation, and I can say with 100% certainty that Publican validates to well-formed and valid DocBook standards. So I think while the gui menu child elements should go in a particular order, the order does not break validation.

           

          I will raise a bug and correct this in the guide.

          • 2. Re: menuchoice, guimenu, guimenuitem, and guisubmenu?
            giang tran Newbie

            Thanks Morgan much! Your answer is so great, and that is what I understood (<guimenuitem> identifies a terminal selection from a menu in a graphical user interface). I will continue reading and following what mentioned clearly in your project. Thanks again!

             

             

            Best day,

            Giang