Subject:Removing spaces from XSLT Source Author:Harry Wedemeijer Date:27 Nov 2002 06:44 AM
When mapping an XML to XML file, the generated XSLT source contains spacing around every tag, e.g.:
But I would like to have:
because my XSLT processor (Perl XML::XSLT) inserts all those spaces and newlines in my resulting XML file.
How can I do that ?
Harry Wedemeijer TNO Institute of Applied Physics
Phone : +31 15 2692274 P.O. Box 155
Fax : +31 15 2692111 2600 AD Delft
Email : firstname.lastname@example.org The Netherlands
Subject:Removing spaces from XSLT Source Author:Lee Humphries Date:27 Nov 2002 06:59 PM
First of all, in the xsl:output element make sure you set the indent attribute to "no" e.g. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
You can also use the xsl:strip-space element, although you'll need to use a different XSLT processor than the native one within Stylus Studio to see the result (go to XSLT->Scenario Properties->Processor tab and pick another).