[Kbabel] Tags validator]

Stanislav Visnovsky visnovsky@nenya.ms.mff.cuni.cz
Mon, 17 Feb 2003 11:12:34 +0100 (CET)


On Wed, 15 Jan 2003, Dwayne Bailey wrote:

> Sometimes these discussion are worthwhile.  I think we still need to
> apply some of our fudges such as "capitals" and <br/> to ensure that
> these messages are still treated as valid and then move on to the msgstr 
> and apply the same checking.
> 
> >>We could also check the msgid in a relaxed mode ie <p> with </p> if that 
> >>passes then do the same on the msgstr.
> >>
> >>If msgid passes no XML test then it is the source of the problem.  Then 
> >>a simple tag count might be more appropriate.  This tag count could 
> >>eliminate errors such as msgid "<ERROR>" being flagged as invalid.
> > 
> > 
> > Maybe no checking at all.
> 
> I would suggest that we check the msgid at various fudge levels.  If it 
> passes at one of these levels then we check the msgstr.  If it fails our 
> most relaxed level then we ignore it.

This is implemented now in HEAD. It's quite easy to add new levels.

ATM, it supports:

1) strict XML
2) strict XML case insensitiv
3) the original check with special cases

To speed it up a bit, it uses cache for identified level, so it does not
try to evaluate msgid all the times.

Stanislav