Hi all, I confirm that the default value is now 'false'.
Regarding the property name, I do like 'indent'. The definition given by WordNet sounds compatible: http://wordnetweb.princeton.edu/perl/webwn?s=indent -> indent (set in from the margin) "Indent the paragraphs of a letter" Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : Fernando Padilla [mailto:f...@alum.mit.edu] Envoyé : lundi 9 février 2009 00:36 À : discuss@restlet.tigris.org Objet : Re: DOM formatting 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:cliff.binst...@coyotereporting.com] > *Envoyé :* vendredi 6 février 2009 00:40 > *À :* discuss@restlet.tigris.org > *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:stephen.grouc...@gmail.com] > *Sent:* Thursday, February 05, 2009 1:41 PM > *To:* discuss@restlet.tigris.org > *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 > <cliff.binst...@coyotereporting.com > <mailto:cliff.binst...@coyotereporting.com>> 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 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1133099