[E-Lang] Minimal-XML (was: Draft Kernel-E DTD & Sketch of translationto debuggable Java)

Mark S. Miller markm@caplet.com
Wed, 27 Sep 2000 11:26:54 -0700


At 06:57 AM 9/27/00 , Jonathan S. Shapiro wrote:
>Your proposed re-encoding is actually the way data encoding is intended to be done
>in XML. Use of attributes for this purpose wasn't appropriate in any case.

Does this mean you have found something readable by the XML folks that 
explains these distinctions?  And that you found their distinctions 
meaningful?  If so, a link would be great.  Or, since I have a much better 
track record of understanding you than them, could you explain this 
distinction?  Minimal-XML does not have attributes, which seems like no loss 
to me.  So if they're actually good for something, it would be great to find 
out.

Note that SOAP uses elements, not attributes, for instance variables of a 
serialized object.


>However, PLEASE don't use a library that is restricted to Minimal XML. One of the
>points of XML is that people can augment it. I can imagine writing transforming
>tools that would introduce new tags (i.e. tags not yours) and new attributes. A
>correct input mechanism can and should ignore these tags and attributes
>successfully when re-importing my augmented XML document. I could even make a case
>that it should preserve the augmented DOM information internally so that it can be
>further retransmitted.

Where are rules or recommendations stated about what an "XML Processor" 
should do when it hits something it doesn't understand?  A link would again 
be great.  In general, I prefer fail-stop to "I don't understand that, 
therefore it must not be important."  Would such augmented XML validate 
against the original DTD?  I'd guess not, in which case the price of 
ignoring such augmentation would be to accept non-validating XML.


>Also, while I'm thinking about it, please use the XML namespace mechanism. I
>propose prefixing all tags by "elang:" thus:
>
>     <elang:callExpr>
>          <elang:nounExpr>a</elang:nounExpr>
>          <elang:verb>add</elang:verb>
>          <elang:nounExpr>b</elang:nounExpr>
>      </elang:callExpr>
>
>Remember that in XML the goal is explicitness, not succinctness. XML is primarily
>designed as a machine-parsed form, and the version with namespace tags will
>compress just as much as the version without.

Well, the goal is certainly not succinctness.  Verbosity hurts humans vastly 
more than it hurts machines.  If I were doing normal S-Expressions, I'd 
write the above as:

     (callExpr a (verb "add") b)



         Cheers,
         --MarkM