The default value should be FALSE. Pretty Printing is not required for all requests ( only during developing/debugging ), and it could actually messup responses, if you do assign special meaning to white-space.. (which rest doesn't say anything about), or force clients to constantly do "trim" or what not..
Jerome Louvel wrote: > Hi Cliff, > > Good suggestion. I've just added this "indent" property to > DomRepresentation in SVN trunk. Its value is true by default. > > Best regards, > Jerome Louvel > -- > Restlet ~ Founder and Lead developer ~ http://www.restlet.org > <http://www.restlet.org/> > Noelios Technologies ~ Co-founder ~ http://www.noelios.com > > > > ------------------------------------------------------------------------ > *De :* Cliff Binstock [mailto:[email protected]] > *Envoyé :* vendredi 6 février 2009 00:40 > *À :* [email protected] > *Objet :* RE: DOM formatting > > Stephen, > > > > Thanks … for the input … still seems like it should be more trivial [ > DomRepresentation#setIndent(boolean), perhaps ] > > > > Cliff Binstock > Coyote Reporting > > ------------------------------------------------------------------------ > > *From:* Stephen Groucutt [mailto:[email protected]] > *Sent:* Thursday, February 05, 2009 1:41 PM > *To:* [email protected] > *Subject:* Re: DOM formatting > > > > Hi, > > Have you considered subclassing DomRepresentation and overriding its > createTransformer() method to set the output properties you want (in > your case, OutputKeys.INDENT to yes)? I had a case where I had to > modify some properties of the XML being produced, and I found that the > easiest way to do it was to subclass the representation in this way. > > On Thu, Feb 5, 2009 at 4:12 PM, Cliff Binstock > <[email protected] > <mailto:[email protected]>> wrote: > > The DOMRepresentation, writes out the DOM as-is. Certainly this is > great in most cases. > > > > However, it would be nice if there was "pretty-print" option that > provided easy-to-look at XML. Of course, I can (and probably will) run > the DOM through my own transformation to pretty-print, but it seems like > use case might be a common desire. > > My current use case is building a Document with Elements, but no Text > nodes, so the resultant XML is one unreadable line. > > > > If there is an existing trivial way to do this, great. If not, consider > this a feature request. > > > > Thanks! > > > > Cliff Binstock > > Coyote Reporting > > > > > > > ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1126309

