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/03/21 16:21:05 UTC

[Bug 1062] New - factory.newTemplates() returns null after DOMSource error

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

*** shadow/1062	Wed Mar 21 07:21:05 2001
--- shadow/1062.tmp.19583	Wed Mar 21 07:21:05 2001
***************
*** 0 ****
--- 1,36 ----
+ +============================================================================+
+ | factory.newTemplates() returns null after DOMSource error                  |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 1062                        Product: XalanJ2                 |
+ |       Status: NEW                         Version: 2.0.1                   |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Normal                   OS/Version:                         |
+ |     Priority:                           Component: org.apache.xalan.templa |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: xalan-dev@xml.apache.org                                     |
+ |  Reported By: curcuru@apache.org                                           |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ TestID:ErrorListenerTest.java testCase3 or code similar to:
+ [error.xsl]
+ blah blah
+ <xsl:decimal-format name="myminus" minus-sign='_' />
+ <xsl:decimal-format name="myminus" minus-sign='`' />
+ blah blah
+ 
+ [code]
+ factory = TransformerFactory.newInstance();
+ factory.setErrorListener(loggingErrorListener);
+ // Attempt to build templates from known-bad stylesheet
+ // Note SAX, Stream sources have error but still build valid Templates object
+ templates = factory.newTemplates(new DOMSource(xslNode));
+ 
+ BUG templates object returned is null; should have either been a valid Templates 
+ object or thrown an exception.  See the Javadoc for this method; it explicitly 
+ states it will never return null.
+ Note that this particular xsl error is reported as fatalError, however similar 
+ tests with a SAXSource or StreamSource work fine, and the Templates object can 
+ even be used to perform transformations.