[openbox] menu.xml - I thought It Only Had One Format/Standard?

R. Mattes rm at mh-freiburg.de
Sun Aug 11 08:57:24 EDT 2013


On Sun, 11 Aug 2013 10:40:54 +0000, Xyne wrote
> Das wrote:
>
> >I just used the menu that was found in the source at;
> >
> >openbox-3.5.0/data
> >
> >So whoever wrote that XML did it this way and I didn't think to consider
> >this....
> >
> >Dana, or whoever created the menu.xml in the source code can we please get
> >it corrected?
> >
> >THANKS
>
> I see no mistakes in that file.

I hope that by "see" you don't really mean _looking_ at the XML. There
are tool for this ;-)

> All menu definitions have opening
> and closing tags, while all menu inclusions are properly opened and
> closed in the same tag.

That would be "well-formed" - which is a subset of "valid". Every valid xml
needs to be well-formed, but not every well-formed xml is valid.

> Incidentally, when including a menu, the tag should only contain the
> "id" attribute.

Where did you get this from - that's not what the xml schema declares:

 ....
  <xsd:attribute name="label" type="xsd:string" use="optional"/>
  <xsd:attribute name="execute" type="xsd:string" use="optional"/>
  <xsd:attribute name="id" type="xsd:string" use="required"/>
 ...

That states that the id attribute is mandatory, but "execute" and
"label" are allowed attributes.

Really, do use a validation tool to check these things:

 $ xmllint  --schema ./data/menu.xsd ./data/menu.xml 1>/dev/null
 ./data/menu.xml:38: element wmclass: Schemas validity error : Element
'{http://openbox.org/3.4/menu}wmclass': This element is not expected.
./data/menu.xml:47: element wmclass: Schemas validity error : Element
'{http://openbox.org/3.4/menu}wmclass': This element is not expected.
./data/menu.xml:118: element wmclass: Schemas validity error : Element
'{http://openbox.org/3.4/menu}wmclass': This element is not expected.
./data/menu.xml:127: element wmclass: Schemas validity error : Element
'{http://openbox.org/3.4/menu}wmclass': This element is not expected.
./data/menu.xml:241: element wmclass: Schemas validity error : Element
'{http://openbox.org/3.4/menu}wmclass': This element is not expected.
./data/menu.xml:285: element wmclass: Schemas validity error : Element
'{http://openbox.org/3.4/menu}wmclass': This element is not expected.
./data/menu.xml:389: element prompt: Schemas validity error : Element
'{http://openbox.org/3.4/menu}prompt': This element is not expected.
./data/menu.xml fails to validate

So there _are_ validation problems with the sample menu.xml deployed
in the openbox 3.5 tarball, but to me it looks like some feature was
added and someone forgot to update the xml schema file. And these are
not the problems DAS reported.

> It is not clear exactly what changes you have made nor what you are
> trying to accomplish. The menu.xml file included in the Openbox
> 3.5.0/data directory does not contain any menu with the ID "apps-
> internet-menu". There is, however, a menu with the ID "apps-net-
> menu". I suspect that you have made more changes than you have
> indicated (clearly) here, and one of those has likely introduced an error.

Sorry, but it _really_ looks like DAS' "bugreport" is incomplete/wrong
(read: he/she has messed up the local conf-file).

> The simplest way to clarify this would be to attach your menu.xml
> file so we can see exactly what you have done, and hopefully offer
> suggestions for improving it.

Yes, no point in further debugging without a reproducible test case.

 Cheers, RalfD



More information about the openbox mailing list