Thanks to all of you. I've put the following XSL stylesheet in my pipeline in order to 
remove namespaces (XSP, I18N, ...) and useless line feed and it works fine except that 
I lose the indentation of the tags.

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:output method="xml" version="1.0" encoding="ISO-8859-1" indent="yes"/>

<xsl:strip-space elements="*"/>

  <xsl:template match="*">
      <!-- remove element prefix (if any) -->
      <xsl:element name="{local-name()}">
        <!-- process attributes -->
        <xsl:for-each select="@*">
          <!-- remove attribute prefix (if any) -->
          <xsl:attribute name="{local-name()}">
            <xsl:value-of select="."/>
          </xsl:attribute>
        </xsl:for-each>
        <xsl:apply-templates/>
      </xsl:element>
  </xsl:template>

</xsl:stylesheet>


Vincent


-----Message d'origine-----
De : news [mailto:[EMAIL PROTECTED] De la part de [EMAIL PROTECTED]
Envoy� : mardi 25 mai 2004 09:25
� : [EMAIL PROTECTED]
Objet : Re: How can I remove line feed in my XML output


MAHE Vincent FTRD/DIH/REN wrote:
> Hello,
> 
> I have a pipeline which produces XML output with Cocoon.
> I would like to remove useless line feed in the output stream in order 
> to have a beautiful indented XML file. How is it possible ?
> 
> For instance, when I have  this :
> <toto>
> 
> <titi>Hello World</titi>
> </toto>
> 
> I would like to have this as output :
> <toto>
>   <titi>Hello World</titi>
> </toto>

Maybe this will help you ... <http://www.xml.com/pub/a/2001/11/07/whitespace.html>
-- 
Volkmar W. Pogatzki


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


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

Reply via email to