http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2754 *** shadow/2754 Mon Jul 23 14:06:58 2001 --- shadow/2754.tmp.10889 Mon Jul 23 14:06:58 2001 *************** *** 0 **** --- 1,129 ---- + +============================================================================+ + | xsltc fails conf test impincl14 using default built-in template in addtion | + +----------------------------------------------------------------------------+ + | Bug #: 2754 Product: XalanJ2 | + | Status: NEW Version: CurrentCVS | + | Resolution: Platform: All | + | Severity: Normal OS/Version: All | + | Priority: Other Component: org.apache.xalan.xsltc | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + The output for the <title> element has unexpected text which looks like it is + the contents of the that element, which most likely were returned by the default + built-in rule (value-of select="*"). However, imported template applied by the + <xsl:apply-imports> should have processed the <title> element and the only ouput + for that node should have been generated by the imported template. + + This bug may be related to bug 1397. + + Expected Output + =============== + <?xml version="1.0" encoding="UTF-8"?> + <out> + + C-title:, + E-title:, + + R-author:Joe Jones + testing-include + + C-chapters: + + + E-chapter: + 1.know xsl + + E-chapter: + 2.love xsl + + </out> + + Obtained Output + =============== + <?xml version="1.0" encoding="utf-8" ?> + <out> + + C-title:,Testing-xsl:include + ^^^^^^^^^^^^^^^^^^ <---- shouldn't be output + + R-author:Joe Jones + testing-include + + C-chapters: + + + E-chapter: + 1.know xsl + + E-chapter: + 2.love xsl + + </out> + + XML file + ======== + <?xml version="1.0"?> + <doc> + <title>Testing-xsl:include</title> + <author>Joe Jones</author> + <overview>testing-include</overview> + <chapters> + <chapter num="1">know xsl</chapter> + <chapter num="2">love xsl</chapter> + </chapters> + </doc> + + Main XSL File + ============= + <?xml version="1.0"?> + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <!-- FileName: impincl14 --> + <!-- Document: http://www.w3.org/TR/xslt --> + <!-- DocVersion: 19991116 --> + <!-- Section: 5.6 Overriding Template Rules --> + <!-- Creator: David Marston --> + <!-- Purpose: Show that apply-imports has limited scope of rules to search. + --> + <!-- "xsl:apply-imports processes the current node using only template rules + that + were imported into the stylesheet CONTAINING THE CURRENT TEMPLATE RULE...." + The apply-imports will be done in c.xsl; rules from r won't apply at that + time. --> + + <xsl:import href="r.xsl"/> + <xsl:import href="c.xsl"/> + + <xsl:template match="doc"> + <out> + <xsl:apply-templates/> + </out> + </xsl:template> + + </xsl:stylesheet> + + + Imported c.xsl + ============== + <?xml version="1.0"?> + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:import href="e.xsl"/> + + <xsl:template match="title"> + C-title:<xsl:text>,</xsl:text> + <xsl:apply-imports/> + </xsl:template> + + <xsl:template match="chapters"> + C-chapters: + <xsl:apply-imports/> + </xsl:template> + + + </xsl:stylesheet>
