This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: whitespace


normbishop1@netscape.net wrote:
...
>     <xsl:output method="text" version="1.0" indent="yes" />
> 
>      <xsl:template match ="/address" xml:space="preserve">
>          <xsl:value-of select="firstname" />  
>       </xsl:template>        
> </xsl:stylesheet>

The xml:space preserves the whitespace in the *XSLT*, i.e.
the linefeed after the <xsl:template..> opening tag, the
indentation of the next line with the <xsl:value-of.../>
element and the linefeed after this and the indentation
of the next line.
Which all doesnt matter because the serializer reformats
the output because of the indent="yes" in the xsl:output.

Try
       <xsl:template match ="/address">
           <test><xsl:value-of select="firstname" /></test>
        </xsl:template>

you should see
           <test>      Mike</test>
somewhere in the output.

J.Pietschmann


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]