[GRASS-dev] PROPOSAL: v.edit WAS: d.* commands
David Finlayson
david.p.finlayson at gmail.com
Thu May 25 03:12:38 EDT 2006
On 5/24/06, Jachym Cepicky <jachym.cepicky at centrum.cz> wrote:
> I also thing, that XML is the way, GRASS should follow.
Maybe not. Eric Raymond in his book on Unix programing has a good
section on text file formats (this is a good book about unix by the
way):
http://www.faqs.org/docs/artu/ch05s02.html#id2907018
Here are the choice words:
One advantage of XML is that it is often possible to detect
ill-formed, corrupted, or incorrectly generated data through a syntax
check, without knowing the semantics of the data.
The most serious problem with XML is that it doesn't play well with
traditional Unix tools. Software that wants to read an XML format
needs an XML parser; this means bulky, complicated programs. Also, XML
is itself rather bulky; it can be difficult to see the data amidst all
the markup.
One application area in which XML is clearly winning is in markup
formats for document files (we'll have more to say about this in
Chapter 18). Tagging in such documents tends to be relatively sparse
among large blocks of plain text; thus, traditional Unix tools still
work fairly well for simple text searches and transformations.
One interesting bridge between these worlds is PYX format — a
line-oriented translation of XML that can be hacked with traditional
line-oriented Unix text tools and then losslessly translated back to
XML. A Web search for "Pyxie" will turn up resources. The xmltk
toolkit takes the opposite tack, providing stream-oriented tools
analogous to grep(1) and sort(1) for filtering XML documents; Web
search for "xmltk" to find it.
XML can be a simplifying choice or a complicating one. There is a lot
of hype surrounding it, but don't become a fashion victim by either
adopting or rejecting it uncritically. Choose carefully and bear the
KISS principle in mind.
More information about the grass-dev
mailing list