From e79bbd302233fb7d80f48473b46d7c9f4566a08a Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Sun, 24 Mar 2024 21:32:27 +0000 Subject: [PATCH] labwc-config(5): clarify applicability of element/attribute (#1655) Co-authored-by: Andrew J. Hesford --- docs/labwc-config.5.scd | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/labwc-config.5.scd b/docs/labwc-config.5.scd index 614821a6..c163bafb 100644 --- a/docs/labwc-config.5.scd +++ b/docs/labwc-config.5.scd @@ -98,7 +98,26 @@ Configuration must be wrapped in a root-element like this: *labwc* parses XML in an element/attribute agnostic way. This is a design decision to increase config file flexibility and keep code simple. In practical -terms, this means that `c` is equivalent to ``. +terms, this means that `c` is usually equivalent to ``. +However, there are some caveats: + + 1. In menu.xml, the attributes *id*, *label* and *execute* must be + expressed as attributes rather than as separate child elements. + + 2. Ordering of attributes can sometimes be singificant. For example, + when setting fonts via attributes rather than children, + + ** + + will set a font for active window titles, while + + ** + + will set a font as if *place* were unspecified, because *name* and + *size* will be processed before *place*. + +In general, it is recommended that attributes not be used to collapse more than +one level of the configuration hierarchy. The following three are therefore treated the same: