lmi
[Top][All Lists]
Advanced

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

Re: [lmi] XRC RNG validation is incomplete


From: Greg Chicares
Subject: Re: [lmi] XRC RNG validation is incomplete
Date: Fri, 22 Jan 2021 22:19:09 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 1/22/21 9:18 PM, Vadim Zeitlin wrote:
> On Fri, 22 Jan 2021 15:49:59 +0000 Greg Chicares <gchicares@sbcglobal.net> 
> wrote:
[...xrc.rnc does not diagnose an error here:
> GC> -                        <growablerows>0,1,2,3,4,5,6,7</growablerows>
...when the actual number of rows is reduced, making "7" invalid...]
> 
>  I don't want to categorically state that checking the indices validity
> would be impossible in RNG as it has some pretty powerful features that I
> am not fully aware about, but I can at least say that I have no idea about
> how to do it, especially in this example, where the number of rows is not
> even specified in the XML file at all, but is deduced from the number of
> child elements in it.

Yup.

>  If we wanted to have an automatic way of finding such problems, I think I
> would write a C++ program reading the file and performing the checks in the
> code rather than trying to do it using just Relax NG. Such program would be
> definitely useful to have, but I'm not sure if it would be useful _enough_
> to warrant writing it -- but please let me know if you think it would.

No, that would be duplicative because wxXRC already detects many such
issues when it loads XRC files. If any effort is justified (and I don't
see a present need), then it would be better to focus it on augmenting
such diagnostics as wxXRC already provides.


reply via email to

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