From: Clark C . E. <cc...@cl...> - 2001-05-19 16:13:39
|
On Sat, May 19, 2001 at 12:19:56AM -0700, Brian Ingerson wrote: | I was chatting on IRC to some Perl gurus who suggested that YAML is no | more a Markup Language than MIDI. Or than a kayak is an automobile. (To | quote them) | | Their point is that a Markup Language marks up text documents. XML is a | data language that can reasonably markup text as well. YAML is not. | (This was their assertion.) First, we are advertising ourselves as specilizing in data serilization. Second, *yawn*, they are just plain wrong (this will be in the FAQ I can see) markup n. a. The collection of detailed stylistic instructions written on a manuscript that is to be typeset. b. Computer Science. The collection of tags that describe the specifications of an electronic document, as for formatting. The primary difference between YAML and HTML is that HTML has named lists, where we do not -- thus our conventions may be different and they might not like the conventions; I personally dislike HTML's conventions. In any case, we can certainly use YAML to provide the above services. | For instance, how would YAML markup: | | <QUOTE>I went to <A HREF="http://www.webvan.com">Webvan</A> to | get my groceries</QUOTE> One must start with the text being marked up, in this case... I went to Webvan to get my groceries. And then give you the markup rules: (a) the whole thing is designated as a QUOTE (b) WebVan is a link to http://www.webvan.com So, here is a YAML marked up using HTML like conventions (the .val means "content of" ) QUOTE: I went to A % HREF: http://www.webvan.com .val: Webvan to get my groceries They may argue that the above isn't obvious. It certainly is to me, since it directly mirrors the data structures as laid out in-memory. I'd say that the equivalent HTML isn't obvious. Let us take another example. Markup: In math class today, I learned that 3 < 4 & 5 < 6. I also learned that addition is difficult. The markup rule, is that the above need to be described as a paragraph! First the YAML. P: | In math class today, I learned that | 3 < 4 & 5 < 6. I also learned that \ addition is difficult. The HTML... <P>In math class today, I learned that<BR> 3 < 4 & 5 < 6. I also learned that<BR> addition is difficult.</P> For this example, I think HTML is the looser. This game is all a matter of taste. Our tastes are different. To Mrs. Helen Antwerp, a retired news paper editor, who edited articles from World War II (1938) up to very recently (1983) and is now in her 80's, neither the above YAML, nor the HTML is _real_ markup. Everyone knows that real markup is something you do to a printed page with a pen for heaven sakes! Kind Regards, Clark P.S. If you want to talk about "obviousness" we can discuss the XML/HTML processing model and the DOM. This is definatley *not* obvious. For example, if you have adjacent text nodes in your DOM, save your DOM as XML, and then re-load your DOM, all of your indexes will be off since the adjacent text nodes will be merged. This ain't obvious. |