Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extra returns in output

Status
Not open for further replies.

tshad

Programmer
Jul 15, 2004
386
US
Why does my ouput get a "\n" put into my code when it goes to the built-in template.

Mine looks like:
Code:
    rules when you debug the stylesheet. For more information on built-in template rules see
    [URL unfurl="true"]http://www.w3.org/TR/xslt#built-in-rule.[/URL]
-->
<xsl:stylesheet version="1.0" xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform">[/URL]

    <!-- Built-in template rules for the mode "#default" -->
    <xsl:template match="* | /">
        <xsl:apply-templates />
    </xsl:template>

    <xsl:template match="text() | @*">
        <xsl:value-of select="." />
    </xsl:template>

    <xsl:template match="processing-instruction() | comment()" />

</xsl:stylesheet>

For example, the line <xsl:value-of select="." /> writes out the "/n" which is the white space of the xml file. This does not cause me a problem but would like to prevent it from writing out out this "/n" or to just ignore it in my xsl file and not go to the built-in file.

How would I handle that?

Thanks,

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top