Re: Scripting in Gnome



On Tue, Feb 03, 2004 at 05:32:23PM +0000, jamie wrote:
> On Tue, 2004-02-03 at 17:14, Danilo Segan wrote:
> 
> > > XML as opposed to what? A propriety text format? An EBNF grammar format?
> > 
> > I suppose you're going to come up with XML scheme (or DTD) that will
> > be as proprietary as any other ASCII-based format with proper
> > documentation.
> > 
> 
> XML is designed to be human readable and so it should in theory be
> easier for someone to alter or create the xml files than it would a
> propriety format. 

That is a rather questionable assertion.  XML is designed to be
human readable, but it definitely not easier to read that formats
more closely aligned to the task.

Here's a sample of a gnumeric expression stored in xml
    <gmr:Cell Col="6" Row="7" ExprID="2">=if(and(not(C8),F8&lt;&gt;&quot;-&quot;,F8&lt;&gt;&quot;&quot;),&quot;Yes&quot;,&quot;&quot;)</gmr:Cell>

Note
    - the Col/Row values are stored as strings and require the
      application to know how to convert them
    - &lt;&gt; is a heck of alot harder to read than '<>'
    - The quotes are very distracting.

Let me guess your next suggestion.  We should jsut store the
preparsed expression as an xml tree.  It doesn't solve any of the
points above and is even harder to read.

xml works nicely for data.  It is not a silver bullet.  IMHO it does
not map well to storing code.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]