Hi Claus,

I would say no. Automatic pretty print interferes with log files, forcing
log statements to become multiline.

And it also interferes with systems that parse XML via plaintext string
functions.

Instead, I propose that we document this feature better in a FAQ and link
to it from the XML-related doc pages.

As a side note, in XSLT pretty print is enabled via the 'indent' attribute
of the xsl:output instruction. In practice, you also need to set
xsl:strip-space to star (*).

Regards,
Raúl.

Sent from a mobile device
On Sep 30, 2012 10:46 AM, "Claus Ibsen" <[email protected]> wrote:

> On Sat, Sep 29, 2012 at 9:54 PM, Babak Vahdat
> <[email protected]> wrote:
> > Hi
> >
> > Welcome to the Camel community!
> >
> > The solution to your problem (as Claus has already mentioned it) is to
> add a
> > property, that's:
> >
> >
> >
> myCamelContext.getProperties().put("org.apache.camel.xmlconverter.output.indent",
> > "yes");
> >
>
> Maybe we should consider this by default? Most people want the XML to
> be nicely outputted.
>
>
> > At very beginning *before* you start routing (believe me as I've already
> > tested it :-)).
> >
> > The "point" is that the default properties the Camel's own XmlConverter
> uses
> > (that's org.apache.camel.converter.jaxp.XmlConverter) does not add the
> > following property:
> >
> >    properties.put(OutputKeys.INDENT, "yes");
> >
> > To the defaults (see the method defaultOutputProperties() of it).
> >
> > So that we do this by ourselves as the value of the constant
> > "javax.xml.transform.OutputKeys.INDENT" is equal "indent".
> >
> > More elegantly you could also make use of Camel's Property component to
> set
> > this property (instead of the one liner above):
> > http://camel.apache.org/properties.html
> >
> > Babak
> > PS: The underlying XQuery engine of Camel is Saxon which uses three
> spaces
> > for indention *if* you ask it to do so.
> >
> >
> > rhuiser wrote
> >> Greetings all,
> >>
> >> I would like the output of my xquery transformation to be indented (it
> is
> >> now a single line which is hard to read by humans).
> >>
> >> I am using:
> >> <to uri="xquery:openTermDepositRequest.xquery"/>
> >> ..are there parameters/options I can add?
> >>
> >> Thanks in advance,
> >> Robin Huiser
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/How-to-indent-output-of-an-qxuery-transformation-tp5720230p5720245.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: [email protected]
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>

Reply via email to