You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Bernie Durfee (JIRA)" <xa...@xml.apache.org> on 2006/01/18 22:34:43 UTC

[jira] Commented: (XALANJ-77) factory.newTemplates() returns null after DOMSource error

    [ http://issues.apache.org/jira/browse/XALANJ-77?page=comments#action_12363165 ] 

Bernie Durfee commented on XALANJ-77:
-------------------------------------

I encountered the same problem. I'm don't agree that this is an 'edge condition' as it's not explicit that an ErrorListener should always be set when using a TransformerFactory.

> factory.newTemplates() returns null after DOMSource error
> ---------------------------------------------------------
>
>          Key: XALANJ-77
>          URL: http://issues.apache.org/jira/browse/XALANJ-77
>      Project: XalanJ2
>         Type: Bug
>   Components: JAXP
>     Versions: 2.1.0
>  Environment: Operating System: All
> Platform: PC
>     Reporter: Shane Curcuru

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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org