Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Syntax check failure

Help
2006-12-18
2013-04-24
  • I notice that when I paste the following XUL content into a xul file, the syntax checker finds a problem with the toolbox element ("cvc-complex-type.2.4.b: The content of element 'toolbox' is not complete. One of [snip] expected"). This content is drawn from the Mozilla XUL tutorials (http://developer.mozilla.org/en/docs/XUL_Tutorial:Simple_Menu_Bars). I'm a little confused by the error message, because it suggests a large number of elements that could be included in a toolbox, but adding an arbitrary one doesn't necessarily resolve the error. Am I mis-understanding, or is this tutorial code sample now incorrect with the XUL spec?

    <?xml version="1.0"?>
    <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
    <window id="example-window" title="Example 5.2.1"
            xmlns:html="http://www.w3.org/1999/xhtml"
            xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    <toolbox flex="1">
      <menubar id="sample-menubar">
        <menu id="file-menu" label="File">
          <menupopup id="file-popup">
            <menuitem label="New"/>
            <menuitem label="Open"/>
            <menuitem label="Save"/>
            <menuseparator/>
            <menuitem label="Exit"/>
          </menupopup>
        </menu>
      </menubar>
    </toolbox>
    </window>

    Thanks -- Dennis