From: Jamis Buck Date: 2004-09-09T04:37:28+09:00 Subject: Re: YAML transformations Hans Fugal wrote: > I love YAML, and I love using YAML in ruby. Thank you Why and everyone > involved. > > It seems a natural thing to want to transform yaml into something else, > e.g. XHTML or some other plain text format, or even more yaml with only > selected pieces of the original, or renaming keys, etc. Does anything > exist along those lines yet? > > If not, what would you consider essential in such a tool? > > . > I know that _why has been doing some of this, for WPGTR. And I've borrowed much of his technique for my Net::SSH and Copland manuals. However, the "transformations" only use YAML for structure, and then RedCloth for the markup. I'm not sure how you'd be able to use YAML (conveniently) for anything other than structure, though... The transformations that I'm currently applying primarily involve converting values from one type to another (e.g., from a Hash to a Chapter). Rendering the converted data types is mostly the work of RedCloth. If you were to automate this somehow, it would be nice to be able to specify the system to use to convert content (RedCloth, BlueCloth, etc.), as well as to provide some kind of schema for automating the translation of "map" or "array" to some other type. No concrete ideas for how to do that, though. :) I'll leave that up to you. - Jamis -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis "I use octal until I get to 8, and then I switch to decimal."