Really *any* whitespace?

<xsl:template match="@*|node()">
   <xsl:copy>
     <xsl:apply-templates select="@*|node()"/>
   </xsl:copy>
</xsl:template>

<xsl:template match="text()">
   <xsl:value-of select="translate(normalize-space(), ' ', '')"/>
</xsl:template>

There are only whitespaces left in attribute values (which you can remove 
too) and where they are necessary because of XML well-formedness. But I 
think, you don't mean *any*, so remove the translate().

Regards,

Joerg

Daniel Meier wrote:
> hi there
> 
> is there a simple solution to transform an xml-file to a new one without any
> whitespace?
> 
> kind regards
> 
> daniel

-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to