Altova Mailing List Archives


Re: RFC: thoughts for a "streamlined" XML syntax variant...

From: Joe Kesselman <keshlam.cat.nospam@-------.--->
To: NULL
Date: 5/11/2012 9:27:00 PM
On 5/11/2012 8:29 PM, BGB wrote:
> in the case of the compiler ASTs, a DOM-like system was used internally,
> rather than raw structures.

Personally I would do a custom datastructure and give it an XML 
serializer, or some other adapter layer that lets you view it in terms 
of an XML infoset -- because trying to shove things into DOM form is 
going to be much less memory-efficient and slower to access than a more 
dedicated representation would be.

> yes, but note the original stated purpose:
> mostly for humans looking over debugging dumps.

If it's for the humans, they will want to be able to use their preferred 
existing XML tools to process those dumps -- otherwise there's no 
advantage to using XML at all, and you might as well use whatever 
nonportable custom representation you prefer... which will probably be 
more readable that raw XML syntax since you can tune it for the needs of 
that specific task.

Or, as a compromise, output XML and then provide a tool which translates 
it into your compact human-readable representation. Then folks who want 
to use text editor to view your version can use that tool, while others 
who prefer an editor which manipulates the XML tree -- or who want to 
use a stylesheet to render the data into another representation entirely 
-- will have that option.

>> Finally: XML's greatest value is that there are lots of tools already in
>> place that support it. This won't be true of any new syntax.
>>
>
> doesn't particularly matter in this case:

XML is just another tool, and no tool is right for all purposes. 
Screwdrivers make poor hammers. Hammers make worse screwdrivers. If 
interoperability and toolability isn't your goal, XML may not be 
relevant for you; do what makes sense for your task.

I have no opinion on the suggested syntax as a representation for 
non-XML trees; I tend to either use raw data or indentation and/or 
delimiters (Lisp/Scheme parens, Algol-family braces, whatever). How well 
your proposal works is going to depend heavily on what kinds of data 
you're presenting and what people are trying to extract from it.


-- 
Joe Kesselman, 
http://www.love-song-productions.com/people/keshlam/index.html

{} ASCII Ribbon Campaign | "may'ron DaroQbe'chugh vaj bIrIQbej" --
/\ Stamp out HTML mail!  | "Put down the squeezebox & nobody gets hurt."

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.