[E-Lang] Minimal-XML (was: Draft Kernel-E DTD & Sketch of translation
to debuggable Java)
Mark S. Miller
markm@caplet.com
Tue, 26 Sep 2000 21:29:51 -0700
At 01:49 PM 9/26/00 , Dan Moniz wrote:
>Some of the more XML-centric people I deal with rely on libxml as the XML swiss
>army parsing chainsaw, but they're working under Linux at the moment, and I
>don't know how portable the code is. There's also the SML (Simplifed Markup
>Language?) project, which is attempting to make a lightweight version of XML;
>perhaps that may have some tools of use (I haven't looked at minml yet, but
>I'll do so now).
libxml is a C library, so it doesn't currently help me.
But on SML, THANK YOU!! Doing some web searching, SML has turned into
Minimal-XML, and minimal it is indeed! The spec is at
http://www.docuverse.com/smldev/minxmlspec.html . For my immediate needs --
representing Kernel-E & JOSS -- it would be fine. I simply need to get rid
of the attributes in my Kernel-E DTD and turn them into text-content
elements. For example, in the current proposal, "a + b" translates to
<callExpr verb="add">
<nounExpr name="a"/>
<nounExpr name="b"/>
</callExpr>
To be compatible with Minimal-XML, it would instead be
<callExpr>
<nounExpr>a</nounExpr>
<verb>add</verb>
<nounExpr>b</nounExpr>
</callExpr>
Changing the rest of the proposed Kernel-E DTD should be equally simple.
Beyond my immediate needs, I intend to use XML as a universal parse tree
representation -- a poor-man's s-expression if you will -- in order to use
quasi-literals to process data that can be so parsed
http://www.erights.org/elang/grammar/quasi-xml.html . Minimal-XML seems
perfectly adequate to this task.
The only remaining issue is what to do about XML data that isn't in
Minimal-XML? Here's a strange idea. If we're going to deal with data in
weird format Foo by parsing it into Minimal-XML, then we should do this as
well when weird format Foo is XML itself! Each parse-node from parsing XML
would be represented as a Minimal-XML element. This will be explosively
more verbose than the original XML, which, if XML's history is any guide,
should only make it more popular ;)
Cheers,
--MarkM