OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Lx: compact syntax for XML

[ Lists Home | Date Index | Thread Index ]

Norman Gray wrote:
>I'd like to announce ... a compact syntax for XML.
	Jeez! Do we have to reinvent the wheel every day?
	If you replace your parenthesis with curly braces, what you
would have is pretty close to the International Standard ASN.1 "Value
Notation" that was standardized back in the 80's. If you use an ASN.1
based stack for your XML processing, you should be able to generate
and read "Value Notation" just as easily as you do normal XML as well
as the ASN.1 defined binary encodings.
	But frankly, I think while it would be nice if XML were more
compact, it will do more harm then good to have two flavors of XML in
the wild. I recognize that you've probably put a lot of good, hard
work into defining your syntax and making the code work, however, I'm
afraid that if it becomes popular, the impact on interop is not going
to be pleasant. If we're going to have a common alternative to XML,
then it should offer *great* advantages over XML -- advantages that
are greater than those that seem to derive from your proposal.
	My personal feeling is that we should accept XML as it is for
text-based interchange. The only alternative that we should be
discussing should be a binary alternatives. These have been shown to
have significant advantages for a significant number of applications.
(i.e. I'm not saying that what you've done isn't "good". I'm just
saying that it wouldn't be good to get it widely adopted.)
	I offer below the "standard" example of ASN.1 Value Notation
as well as the XML version of the same data. This should give you an
idea of how to map from one to the other. This is documented in X.680
which you can download (free!) from:
http://asn1.elibel.tm.fr/en/standards/index.htm

ASN.1 Value Notation for a "person" record:

person ::=
{ name {givenName "John", initial "P", familyName "Smith"},
  title "Director",
  number 51,
  dateOfHire "19710917",
  nameOfSpouse {givenName "Mary", initial "T", familyName "Smith"},
  children
   { {name {givenName "Ralph", initial "T", familyName "Smith"} ,
       dateOfBirth "19571111"},
     {name {givenName "Susan", initial "B", familyName "Jones"} ,
       dateOfBirth "19590717" }
   }
}

The same in XML:

person ::=
<PersonnelRecord>
  <name>
    <givenName>John</givenName>
    <initial>P</initial>
    <familyName>Smith</familyName>
  </name>
  <title>Director</title>
  <number>51</number>
  <dateOfHire>19710917</dateOfHire>
  <nameOfSpouse>
    <givenName>Mary</givenName>
    <initial>T</initial>
    <familyName>Smith</familyName>
  </nameOfSpouse>
  <children>
    <ChildInformation>
      <name>
        <givenName>Ralph</givenName>
        <initial>T</initial>
        <familyName>Smith</familyName>
      </name>
      <dateOfBirth>19571111</dateOfBirth>
    </ChildInformation>
    <ChildInformation>
      <name>
        <givenName>Susan</givenName>
        <initial>B</initial>
        <familyName>Jones</familyName>
      </name>
      <dateOfBirth>19590717</dateOfBirth>
    </ChildInformation>
  </children>
</PersonnelRecord>


		bob wyman





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS