Re: [xsl] Best way of preserving comments?

Subject: Re: [xsl] Best way of preserving comments?
From: "Tony Graham" <tgraham@xxxxxxxxxx>
Date: Wed, 3 Apr 2013 14:56:48 +0100 (IST)
On Wed, April 3, 2013 2:08 pm, Wolfgang Laun wrote:
> Using XSLT 2, this combination:
>
>  <xsl:strip-space elements = "*" />

If you don't strip white-space and do use:

<xsl:output method="xml" indent="no" />

then you should get your existing white-space without the added indent:

> <processor_data _ix="0" reo_bos_zentrale="----"/>
>    <!-- __________CCA-patches IRT_______________ -->

Since you say you want to skip some elements, you may also want a template
to skip the white-space nodes before/after the skipped elements.

Regards,



Tony Graham                                   tgraham@xxxxxxxxxx
Consultant                                 http://www.mentea.net
Mentea       13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
 --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
    XML, XSL-FO and XSLT consulting, training and programming

Current Thread