On Tue, 2010-10-05 at 23:16 +0100, James Turner wrote:
> This is my fault, I changed the SGCondition logic to be order dependant, 
> instead of the previous 'property is always take as the LHS, even if appears 
> on the RHS' behaviour. At the time I did some greps of data/Aircraft to see 
> if anyone was using the 'reversed' syntax, and didn't find any, but your 
> result indicates my grep-ing didn't work - not good.
> 
> The reason for the change was <less-than>, and the other comparison 
> conditionals, now also support <expression> as a child, and I didn't want to 
> define an arbitrary ordering between <value>, <property> and <expression>. 
> Frankly until I looked at the old code, I would never have believed your two 
> examples were identical.
To be honest my limited mind would always expect values to be compared
to properties instead of properties being compared to values..

> Does anyone have the necessary fu with an XML-grep tool, to find all 
> instances of less-than and greater-than in data/Aircraft, where a <value> tag 
> is the first child? That should find all the likely problem cases.

There is a utility xmlgrep in flightgear/utils/xmlgrep

It works on fixed paths but wildcards are allowed, e.g.:

xmlgrep -r /PropertyList/animation -p condition */*/*KAP140*.xml

This will print all condition sections within an animation tag.

Erik




------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to