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

including a stylesheet that has a func:function tag gives an error

           Summary: including a stylesheet that has a func:function tag
                    gives an error
           Product: XalanJ2
           Version: 2.4Dx
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: org.apache.xalan.transformer
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Using:  WindowsMe
        JDK1.3.0_02
        xalan-j_2_4_D1

If I have stylesheet1 that includes stylesheet2 at its top level, and
stylesheet2 has a func:function element at its top level, I get the following error:

   func:function element must be top level

According to http://www.w3.org/TR/xslt#include , 
"The resource located by the href attribute value is parsed as an XML document,
and the children of the xsl:stylesheet element in this document replace the
xsl:include element in the including document. "

I take this to mean that func:function element of stylesheet2 becomes a top
level element in stylesheet1 because of its inclusion.  This means that
func:function is already a top level element, and the transformer should not
give such an error message.

I will attach 3 files:
   toppage.xsl
   subpage.xsl
   file.xml

The command used was:

"%JAVAHOME%\bin\java.exe" -classpath "%XALANCLASSPATH%"
org.apache.xalan.xslt.Process -IN file.xml -XSL toppage.xsl

Thank you.

Reply via email to