Hi Maxence, Thanks for the patch. We are already discussing some refactorings for the TransformRepresentation. You proposition looks good and should be considered at the current issue. I've added a comment with a link to your patch: http://restlet.tigris.org/issues/show_bug.cgi?id=377
BTW, do you mind sending us a signed JCA so we can quickly apply your patch when we are ready to do so? Here are the details: http://www.restlet.org/community/contribute Best regards, Jerome > -----Message d'origine----- > De : news [mailto:[EMAIL PROTECTED] De la part de Maxence Bernard > Envoyé : mardi 18 décembre 2007 18:53 > À : [email protected] > Objet : Patch to allow XML indentation > > Hi all, > > I have attached a patch that allows to indent the XML output by a > DomRepresentation. > This feature can be toggled on or off and is disabled by > default. I believe it > comes in handy when developing an application that writes XML > as it makes the > output a lot more readable and thus easier to debug. > > I have added the following methods to > org.restlet.resource.DomRepresentation : > + public getIndent() > + public void setIndent(boolean) > + protected Transformer getTransformer() : exposes the > Transformer used to > write the XML and allows subclasses to override it and > return a custom > Transformer or specify additional properties. For the same > reason, I have made > getDocumentBuilder() protected instead of private. > > The patch is based off Restlet 1.0.6, you can get it here: > http://www.mucommander.com/scratch/DomRepresentation-1.0.6.java.diff > > I hope this will be useful to some of you and possibly be integrated. > > Thanks for Restlet and the work you put into it! > My best, > Maxence Bernard > --- > http://www.mucommander.com

