DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3688>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3688

           Summary: xsltc differs from Xalan on conf test whitespace23
           Product: XalanJ2
           Version: 2.0.0
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: org.apache.xalan.xsltc
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The output differs in two ways: Xalan replaced the spaces in the 
href with %20, xsltc didn't; Xsltc output blank lines, Xalan didn't.
Note: Neither XT nor Saxon escaped the spaces. I'm just entering 
this for the record, but it is very minor.

Running xalan on whitespace23
<html>
<a href="value%20xx">value xx</a>
<a href="value">value</a>
<a href="value%20zz">value zz</a>
<a href="value%20yy">value yy</a>
<a href="value%20xx">value xx</a>
<a href="value">value</a>
<a href="value%20zz">value zz</a>
<a href="value%20yy">value yy</a>

</html>



Running XSLTC with Xerces Parser on whitespace23
<html>
  <a href="value xx">value xx</a>

  <a href="value">value</a>

  <a href="value zz">value zz</a>

  <a href="value yy">value yy</a>

  <a href="value xx">value xx</a>

  <a href="value">value</a>

  <a href="value zz">value zz</a>

  <a href="value yy">value yy</a>

</html>

 cat whitespace23.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0" 
                xmlns:ns1="www.ns1.com" xmlns:ns2="www.ns2.com"
                exclude-result-prefixes="ns1 ns2">

  <!-- FileName: whitespace23 -->
  <!-- Document: http://www.w3.org/TR/xslt -->
  <!-- DocVersion: 19991116 -->
  <!-- Section: 3.4 Whitespace Stripping -->
  <!-- Creator: Scott Boag (in response to problem reported by "Carsten
Ziegeler" <[EMAIL PROTECTED]>) -->
  <!-- Purpose: Another test for the normalize-space function, this one really
testing handling of the newline. -->

<xsl:template match = "doc">
   <html>
        <xsl:for-each select="link">
                 <a>
                                 <xsl:attribute name="href"><xsl:value-of
                                select="normalize-space(url)"/></xsl:attribute>
                                 <xsl:value-of select="normalize-space(url)"/>
                 </a>
                 <xsl:text>&#10;</xsl:text>
        </xsl:for-each>

        <xsl:for-each select="link">
                 <a href="{normalize-space(url)}">
                                 <xsl:value-of select="normalize-space(url)"/>
                 </a>
                 <xsl:text>&#10;</xsl:text>
        </xsl:for-each>

   </html>
</xsl:template>

</xsl:stylesheet>

cat whitespace23.xml
<?xml version="1.0"?>
<doc> 
<link>
                 <url>
                                 value
                                 xx
                 </url>
</link>
<link>
                 <url>
                                 value
                 </url>
</link>
<link>
                 <url>
                                 value      zz
                 </url>
</link>
<link>
                 <url>
                                 value yy
                 </url>
</link>

</doc>

Reply via email to