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

YAML Ain't Markup Language

  • To: xml-dev@l...
  • Subject: YAML Ain't Markup Language
  • From: "Simon St.Laurent" <simonstl@s...>
  • Date: Fri, 6 Jun 2003 08:13:39 -0400

yaml
Years ago, discussion of simplified XML left this list for SML-DEV.
There were a lot of fruitful conversations on SML-DEV, some of which
have come back here, others of which have gone elsewhere.  YAML seems to
have found its own community, and evolved quite a spec:

http://yaml.org/spec/

Like XML, YAML is built on Unicode text, but its creators have
explicitly set different priorities:

>YAML Ain't Markup Language, abbreviated YAML, is both a human-readable
>data serialization format and processing model. This text describes
>the class of data objects called YAML document streams and partially
>describes the behavior of computer programs that process them.
>
>YAML document streams encode in a textual form the native data
>constructs of modern scripting languages. Strings, arrays, hashes, and
>other user-defined data types are supported. A YAML document stream
>consists of a sequence of characters, some of which are considered part
>of the document's content, and others that are used to indicate
>document structure.

Human readability and editing are still important, but information
structures come from the programming domain, without a notion of humans
adding metadata to documents.  At the same time, its type system
(http://yaml.org/spec/#.Type-Families) is very different from W3C XML
Schema.

The differences in structures and approach are made explicit in a brief
section on YAML's relation to XML:

>Newcomers to YAML often search for its correlation to the eXtensible
>Markup Language (XML). While the two languages may actually compete in
>several application domains, there is no direct correlation between
>them. YAML is primarily a data serialization language. XML is often
>used for various types of data serialization but that is not its
>fundamental design goal.
>
>There are many differences between YAML and XML. XML was designed to
>be backwards compatible with Standard Generalized Markup Language
>(SGML) and thus had many design constraints placed on it that YAML
>does not share. Also XML, inheriting SGML's legacy, is designed to
>support structured documents, where YAML is more closely targeted at
>messaging and native data structures. Where XML is a pioneer in many
>domains, YAML is the result of many lessons from the XML community.
>
>The YAML and XML information models are starkly different. In XML, the
>primary construct is an attributed tree, where each element has an
>ordered, named list of children and an unordered mapping of names to
>strings. In YAML, the primary constructs are sequence (natively stored
>as an array), mapping (natively stored as a hash) and scalar values
>(string, integer, floating point). This difference is critical since
>YAML's model is directly supported by native data structures in most
>modern programming languages, where XML's model requires mapping
>conventions, or an alternative programming component (e.g. a document
>object model).
>
>It should be mentioned that there are ongoing efforts to define
>standard XML/YAML mappings. This generally requires that a subset of
>each language be used.

For developers looking for data serialization approaches that are more
amenable to their existing structures than XML, YAML seems worth a much
closer look.  It seems to me to combine XML's structured text foundation
and ASN.1's programming orientation, perhaps giving programmers the best
of both worlds.

Kendall Clark explored YAML last year:
http://www.xml.com/pub/a/2002/07/24/yaml.html

For more of the history of SML-DEV and YAML, see Leigh Dodds' piece at:
http://www.xml.com/pub/a/2001/08/01/simpler.html


-- 
Simon St.Laurent
Ring around the content, a pocket full of brackets
Errors, errors, all fall down!
http://simonstl.com -- http://monasticxml.org

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.