From: Oren Ben-K. <or...@be...> - 2003-10-20 22:59:10
|
Clark C. Evans wrote: > ... Remember, this comes *after* > the Abstract but before anything else in the specification. > Thus, they already have been told that YAML is a > serialization language. OK, assuming we forget about calligraphy for a second :-) This is quite good, with a few nits (you know me :-). > YAML Ain't Markup Language engages two concerns simultaneously: > how to view application data structures in a manner independent of > programming language, and then, how to serialize this view in a > way which is machine parsable yet pleasing to the eye. > > YAML addresses the first hurdle by defining an information model, > the YAML graph, as a recursive combination of three primitives: > strings, hash-tables, and arrays. YAML handles user-defined types > by tagging each node in a graph with a type specifier. Application > developers may visualize a YAML graph as an abstract node interface > which can be provided with an adapter. > > YAML addresses the second hurdle in two steps. First, it specifies > how YAML information is to be flattened from a (perhaps > multi-dimensional) graph into a two-dimentional tree. Lose the dimensions. Graphs don't have dimensions, as such. Well, there are things such as planar maps, but once you are not planar, everything can be done in 3D and counting dimensions becomes pointless. We actually use trees to create a one-dimensional stream anyway. I'd just say "flattened from a graph into a tree". > Second, it > details the decorative options available while formatting this tree > into a character representation, or calligraphy. Some s/representation, or calligraphy/stream/. > characters in > a YAML calligraphy therefore represent the content of the s/calligraphy/stream/. > corresponding > graph, while others are needed for serialization purposes or have > been added for eye candy. > > YAML information can thus be viewed in two primary ways: for machine > processing and for human presentation. A YAML _processor_ is a > tool for converting YAML information between these complementary > views. It is assumed that a YAML processor does its work on > behalf of > another module, called an _application_. This specification > describes > the required behavior of a YAML processor, how a YAML processor > must read or write YAML calligraphy and the corresponding graph s/YAML calligraphy/a YAML stream/. > structure it must provide to or obtain from the application. Have fun, Oren Ben-Kiki |