On 4 Mar 2005, at 15:08, Curtis L. Olson wrote:

It's maybe analogous to writting assembly language without any sort of jump labels ... anytime you insert a statement, you have to go back and recompute all your jump addresses (or in this case any time you add anything you need to go back and recompute all your indentation levels ...)

An 'obvious', not non-trivial solution:

the current alias logic is used to refer to one XML node, from another, using a file-system like syntax. This is pretty much the job XPaths were designed to solve. XPaths support a syntax similar to what is being used for aliases (I think), but also support matching by tag name / attribute (for example, and id attribute)

So one option would be to implement a small subset of useful XPath functionality, or just to support something like a 'named-alias' where instead of using

../../../../../my-params/foo/bar


you could use (for example)

@my-params/foo/bar

This is robust against the relative position / depth of the XML nodes changing, naturally. Implementing the '@' operator is not especially difficult, but it can be a costly operation to do repeatedly (you need to either build a map of named nodes, or do a search each time). I assume for panels the alias is only resolved at panel load, so the cost is unimportant.

H&H
James
--
Morbo finds all humans pathetic


_______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to