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=3835>.
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=3835

xsltc fails conf test sort32 and sort33 setting order and data-type from variables

           Summary: xsltc fails conf test sort32 and sort33 setting order
                    and data-type from variables
           Product: XalanJ2
           Version: 2.0.0
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: org.apache.xalan.xsltc
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Looks like xsltc is failing sort32 because it is not doing a number 
sort, which implies the data-type attribute is not being set correctly
when you try to set it from a variable. sort33 tries to set the 'order'
from a variable, but it doesn't take.

Here's more detail on sort32:

Running xalan on sort32
<?xml version="1.0" encoding="UTF-8"?>
<out>
    Ascending order....
    bogus|0.5|1|1.0|1.1|007|7|11|</out>


Running XSLTC with Xerces Parser on sort32
<?xml version="1.0" encoding="utf-8" ?>
<out>
    Ascending order....
    0.5|007|1|1.0|1.1|11|7|bogus|</out>

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

  <!-- FileName: SORT32 -->
  <!-- Document: http://www.w3.org/TR/xslt -->
  <!-- DocVersion: 19991116 -->
  <!-- Section: 10 -->
  <!-- Creator: David Marston -->
  <!-- Purpose: Try to set data-type from a variable. -->

<xsl:template match="doc">
  <xsl:variable name="typer" select="'number'"/>
  <out>
    Ascending order....
    <xsl:for-each select="t">
      <xsl:sort data-type="{$typer}"/>
      <xsl:value-of select="."/><xsl:text>|</xsl:text>
    </xsl:for-each>
  </out>
</xsl:template>

</xsl:stylesheet>

Reply via email to