[xml] xsl:copy and line breaks between attributes

I'm using a stylesheet to make a very small number of changes to some
files. So The vast majority of things go through a template which
matches "@*|node()" and uses xsl:copy. The files are edited by humans so
they are nicely indented and I don't want any incidental changes in the

The problem is that where there are line breaks between attributes in an
XML element, xsl:copy puts the whole XML element onto one line. So
  <foo val="bar">

I appreciate that this isn't a bug but it makes xsltproc all but useless
in this situation.  I don't suppose it would be possible to make xsl:copy
preserve whitespace within elements?

Oliver Kiddle

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]