[
Lists Home |
Date Index |
Thread Index
]
Frans Englich wrote:
>Let's say that for each file(in a directory hierarchy) we have an XML document
>representing it, and it should specify the file's location in the hierarchy,
>such that one can find out where it is located by only inspecting the XML
>document for the file. Would this be appropriate?
>
>
>
>
<snip/>
>starting point..) -- would it then still be best to go XML instead of simply
>having the whole path in a string? Yes, I doubt, because it seems massively
>slow and I have never seen anyone do it which makes it feel like trying to
>innovate(or I'm simply failing to realize the power of XML?).
>
>The actual purpose is reports from a regression framework, which tell in what
>file a certain test failed, and then the user is supposed to be able to do
>queries similar to "show failures of text X in directory foo" and then the
>reports which are generated by test X, and are in directory foo, are
>returned.
>
>
>
Data (like a path) should always be represented in a form that allows to
easily do what one wants to do with it.
If somewhere in your regression test framework, you need to make a
system call, you will need a string representation.
If that is the *only* thing for what you need the path (anticipating all
future extensions things of your program), then I don't see why you
would want to map the tree structure in your XML document.
On the other hand, if you have some other use for the path (which would
need parsing the string), it might be nice to parse it once and for all,
and convert it back to string just for the system calls from above.
There is never a general answer. Any modelling
methodology/tool/formalism can be abused if one pushes it too far.
cheers,
Burak Emir
http://lamp.epfl.ch/~buraq
|