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

XSLTC: JAXP transform fails with DOM stylesheet

           Summary: XSLTC: JAXP transform fails with DOM stylesheet
           Product: XalanJ2
           Version: 2.3
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: org.apache.xalan.xsltc
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When I perform JAXP transforms using the xsltc TransformerFactory 
(i.e., "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"), an exception is 
thrown in the newTemplates() method if the stylesheet is provided as a DOM 
document.  The same code works if I use the default xalan transformer factory.

Relevant code is the following (xsldoc is a sinple stylesheet in DOM document 
format).
            TransformerFactory transFactory = TransformerFactory.newInstance();
            DOMSource xslSource = new DOMSource(xsldoc);
            Templates template = transFactory.newTemplates(xslSource);

The following exception is thrown when I execute the above code with xalan 
2.3.1.

ERROR: The input document is not a stylesheet (the XSL namespace is not 
declared in the root element).

javax.xml.transform.TransformerConfigurationException: Could not compile 
stylesheet
        at org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTemplates
(TransformerFactoryImpl.java:515)

Reply via email to