http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2583 *** shadow/2583 Wed Jul 11 11:34:03 2001 --- shadow/2583.tmp.12073 Wed Jul 11 11:34:03 2001 *************** *** 0 **** --- 1,68 ---- + +============================================================================+ + | xsltc fails conf tests conflictres22 and 23 with predicates in match patte | + +----------------------------------------------------------------------------+ + | Bug #: 2583 Product: XalanJ2 | + | Status: NEW Version: 2.0.0 | + | Resolution: Platform: Sun | + | Severity: Normal OS/Version: Solaris | + | Priority: Other Component: org.apache.xalan.xsltc | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + These two tests appear to show that XSLTC does not correctly give higher + priority to templates with predicates in their match patterns. + + In test 22, the template with match="comment()[.=' a-comment ']" should take + prcedence over the template with match="comment()". + + conflictres22 + ============ + Xml + === + <?xml version="1.0"?> + <doc><!-- a-comment --><!-- b-comment --></doc> + + XSL + === + <?xml version="1.0"?> + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <!-- FileName: conflictres22 --> + <!-- Document: http://www.w3.org/TR/xslt --> + <!-- DocVersion: 19991116 --> + <!-- Section: 5.5 --> + <!-- Creator: David Marston --> + <!-- Purpose: Test for conflict resolution on a predicate of a node test for + comments. --> + <!-- should see 1 conflict warning --> + + <xsl:template match="doc"> + <out> + <xsl:apply-templates/> + </out> + </xsl:template> + + <xsl:template match="comment()"> + <xsl:text>Any-comment,</xsl:text> + </xsl:template> + + <xsl:template match="comment()[.=' a-comment ']"> + <xsl:text>Specific-comment,</xsl:text> + </xsl:template> + + </xsl:stylesheet> + + Expected Output + =============== + <?xml version="1.0" encoding="UTF-8"?> + <out>Specific-comment,Any-comment,</out> + + Obtained Ouput + ============== + <?xml version="1.0" encoding="utf-8" ?> + <out/>