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

*** shadow/2582 Wed Jul 11 11:13:14 2001
--- shadow/2582.tmp.11473       Wed Jul 11 11:13:14 2001
***************
*** 0 ****
--- 1,78 ----
+ +============================================================================+
+ | xsltc fails conflictres19 and 20 on namespace vs non-namespaced elements   |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 2582                        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 tests look like they are getting at the same bug. They test the priorty of
+ namespaced vs non-namespaced elements with the latter ranking higher than the
+ former. The difference in the expected vs obtained results doesn't look like a
+ prioritization problem but a problem with the "exclude-result-prefixes" 
+ attribute of the stylesheet element:
+ 
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+     version="1.0" xmlns:ped="http://www.ped.com"; 
+     exclude-result-prefixes="ped">
+ 
+ Notice the "ped" prefix is excluded. 
+ 
+ The xml for test conflictres20 is 
+ 
+ <?xml version="1.0"?>
+ <doc xmlns:ped="http://www.ped.com";>
+   <a/>
+   <ped:a/>
+   <ped:b/>
+ </doc>
+ 
+ The templates applied are:
+ 
+ <xsl:template match="doc">
+   <out>
+     <xsl:apply-templates/>
+   </out>
+ </xsl:template>
+ 
+ <xsl:template match="*">
+   <xsl:value-of select="name(.)"/><xsl:text>-Wildcard,</xsl:text>
+ </xsl:template>
+ 
+ <xsl:template match="ped:*">
+   <xsl:value-of select="name(.)"/><xsl:text>-Qualified-wildcard,</xsl:text>
+ </xsl:template>
+ 
+ <xsl:template match="ped:b">
+   <xsl:text>found ped:b,</xsl:text>
+ </xsl:template>
+ 
+ 
+ The difference in the output is that XSLTC replaces the "ped"  prefix 
+ with the ped namespace url, whereas the other processors don't.
+ 
+ Expected Output
+ ===============
+ <?xml version="1.0" encoding="UTF-8"?>
+ <out>
+   a-Wildcard,
+   ped:a-Qualified-wildcard,
+   found ped:b,
+ </out>
+ 
+ Obtained Output
+ ===============
+ <?xml version="1.0" encoding="utf-8" ?>
+ <out>
+   a-Wildcard,
+   http://www.ped.com:a-Qualified-wildcard,
+   found ped:b,
+ </out>

Reply via email to