lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] [PATCH] Fix XRC validation errors


From: Vadim Zeitlin
Subject: [lmi] [PATCH] Fix XRC validation errors
Date: Tue, 7 Apr 2015 22:16:44 +0200

 Hello,

 Before submitting the rest of the patches with more meaningful changes,
I'd like to fix the errors that prevent XRC files from passing validation,
so here is a slightly updated version of the patch from
http://lists.nongnu.org/archive/html/lmi/2013-10/msg00004.html which does
it. The patch is not too big and completely trivial as it either removes
the elements which were ignored anyhow or changes the (ignored) occurrences
of "<value>0</value>" to "<checked>0<checked>" for wxCheckBox which doesn't
really change anything neither as wxCheckBox is unchecked by default
anyhow. Because of this I hope it can be applied without problems but, as
always, please let me know if you do see any or have any questions about
it.


 If, by chance, you'd like to redo the validation yourself, both to see the
original errors and to verify that none remain after applying this patch,
I've written some [too?] detailed instructions about how to do it at
http://wxwidgets.blogspot.com/2015/04/validating-xrc.html and they apply to
lmi. The XRC schema for lmi custom XRC elements was posted to this list in
http://lists.nongnu.org/archive/html/lmi/2013-10/msg00003.html but I also
include it here, in a slightly more compact form:
---------------------------------- >8 --------------------------------------
default namespace = "http://www.wxwidgets.org/wxxrc";
namespace xrc = "http://www.wxwidgets.org/wxxrc";

include "http://www.wxwidgets.org/wxxrc"; {
  customClasses = (
    element object {
        attribute class { "InputSequenceEntry" } &
        stdObjectNodeAttributes &
        stdWindowProperties &
        [xrc:p="o"] element title {_, t_text }*
    } |
    element object {
        attribute class { "RoundingButtons" } &
        stdObjectNodeAttributes &
        stdWindowProperties
    }
    )
}
---------------------------------- >8 --------------------------------------

 Combining the instructions from the blog with the schema above, you should
be able to run

        java -jar jing.jar -C catalog.xml -c lmi_xrc_schema.rnc *.xrc

without any errors after applying the patch. BTW, I think it would be nice
to put lmi_xrc_schema.rnc into lmi repository and, perhaps, even to add a
makefile target akin to (or a dependency of?) check_concinnity using it to
validate all the XRC files. But this is not, strictly speaking, required,
unlike the patch attached to this message itself which I'd really like to
see applied.

 Thanks in advance!
VZ

Attachment: 0001-Fix-XRC-validation-errors.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]