You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2001/11/21 00:09:13 UTC

DO NOT REPLY [Bug 4987] New: - apply-imports needs to be more careful in default case

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

apply-imports needs to be more careful in default case

           Summary: apply-imports needs to be more careful in default case
           Product: XalanJ2
           Version: 2.2.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Xalan
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: David_Marston@lotus.com


Morten sent me a test which I modified and designated impincl20. It has a lot of
files, so contact me if you need them. The essence of the problem:
MAIN STYLESHEET HAS:
<xsl:import href="fragments/imp20b.xsl"/>
<xsl:import href="fragments/imp20d.xsl"/>
<xsl:template match="foo">
  <A><xsl:apply-imports/></A>
</xsl:template>
There is a <foo> in the input, so the above matches, then goes on to process
<foo> according to templates in imp20d, where it finds:
<xsl:template match="foo">
  <D>
    <xsl:apply-imports/>
  </D>
</xsl:template>
We get the <D>s inside the <A>s as we should. There are no imports in this file,
so the apply-imports should revert to the behavior of apply-templates, meaning
that we should not try to search for more <foo> templates. But we actually go
on to match the <foo> template in imp20b, and continue from there.
Interesting note: no problem with impincl14, where the main stylesheet doesn't
do apply-imports but the imported one does. Other tests of apply-imports are
also okay.