I would imagine it would consist of recursively iterating over xml elements, with the recursive function taking an indent level argument and passing it to iself incremented; and in each iteration returning the input with spaces added before each element in propertion to the indent level, and newlines after each element. The function can either return a modified NodeSeq or a String. It should accept a NodeSeq and pattern match on it, performing the above behavior for Elems, skipping input whitespace, and expanding Groups.
------------------------------------- Peter Robinett<[email protected]> wrote: How hard would this be to implement? I'm a big fan of pretty HTML output, so I'd be interested in implementing this if it's not too hard. Peter Robinett On Nov 7, 7:06 am, David Pollak <[email protected]> wrote: > On Sat, Nov 7, 2009 at 1:01 AM, aw <[email protected]> wrote: > > > Is there a mode whereby I can turn on pretty printed output for my > > xhtml? (I'm thinking of a LiftRule, I think?). Preferably, I'd also > > like to control some details like indentation size. > > No mode for that... sorry. > > > > -- > Lift, the simply functional web frameworkhttp://liftweb.net > Beginning Scalahttp://www.apress.com/book/view/1430219890 > Follow me:http://twitter.com/dpp > Surf the harmonics --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
