[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Lx: compact syntax for XML


xml compact syntax
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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.