* Tim Moore -- Tuesday 07 April 2009:
> Melchior FRANZ wrote:
> >   <array>
> >       <entry>alpha</entry>
> >       <entry>bravo</entry>
> >       <entry>charly</entry>
> >       <entry>delta</entry>
> >   </array

> So why do you care if <entry> and </entry> are replaced by ' '?

Well, so far the samples usually looked something like this:
<ambient>0.2 0.4 0.1 0.5</ambient>.  Doesn't look *that* bad, indeed.
But in reality floats don't usually have just one digit after the
comma. What about this?

   <foo>2345.1239878725027 235.237926028973 558.1283745628374 
9.123242342346</foo>

There goes the nicety. As long as this is only an XML markup
question, the disadvantages are:

- higher failure probability
- one has to know about the order and meaning of elements; they
  are not self-describing
- it's a bastardized format: it's a custom format *within* XML
- XML tools can only treat the entry as a whole, but not the elements.
  For example: a *.dtd file cannot validate the entries
  (http://en.wikipedia.org/wiki/Document_Type_Definition; not that
  I have any experience with that)
- XML editors might not support such conglomerates (ok, weak argument
  ... who on earth uses an XML editor?! ;-)


If you find "proper" <PropertyList>s so disgusting, then you could just
use the XML parser directly, like Durk did it for some airport data
(parking/traffic), or yasim to read its config files. Just write a
shader XML file reader. You don't need to read them into the tree,
I guess.

I think it would be a bad idea, but I could live with it. (I've multiple
times complained about such custom (non-<PropertyList>) files in fgfs,
because they made it impossible to load the taxiing files into the tree,
for manipulating or visualizing the route points. I spent several hours
for writing Nasal's parsexml() built-in function and io.readxml/io.writexml,
only to allow that!)



But that's all just XML representation. As soon as this thing ends up
being stored in the property tree as new vec4, color etc. nodes, the fun
is over:

  foo = '2345.1239878725027 235.237926028973 558.1283745628374 9.123242342346' 
(vec4)
  background = '0.12332975 0.123784967 0.28375891205 0.127456582302' (color)

Should we make the property browser full-screen, so that one can still
handle the entries? But that's only the response to your question:

| So why do you care if <entry> and </entry> are replaced by ' '?

The other issues are much more problematic. See the other messages for
that.

m.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to