You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Brian Minchau (JIRA)" <xa...@xml.apache.org> on 2006/10/17 19:42:37 UTC

[jira] Commented: (XALANJ-2320) Excluding result prefix of a namespace not declared caused NPE

    [ http://issues.apache.org/jira/browse/XALANJ-2320?page=comments#action_12443006 ] 
            
Brian Minchau commented on XALANJ-2320:
---------------------------------------

When running this stylesheet:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                              xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" 
                              xmlns:polphdr="http://www.polaris-uk.co.uk/GenericSchema/2_1/PEMHeader" 
                              xmlns:java="http://xml.apache.org/xslt/java" 
                              exclude-result-prefixes="axa soap-env java"/> 

(note the closing /> on that element !!!) there was no longer a NPE, so the code has evolved. The current behavior is to throw a TransformerConfigurationException that wraps a SAXException with the message:
  Can not resolve namespace prefix: axa

I think this one is fixed in the latest development code.


> Excluding result prefix of a namespace not declared caused NPE
> --------------------------------------------------------------
>
>                 Key: XALANJ-2320
>                 URL: http://issues.apache.org/jira/browse/XALANJ-2320
>             Project: XalanJ2
>          Issue Type: Bug
>          Components: transformation
>    Affects Versions: 2.7
>            Reporter: Andrew Hay
>            Priority: Minor
>             Fix For: Latest Development Code
>
>
> Currently migrating from Xalan 2.3.1 to 2.7.0.  Had an issue with an XSL stylesheet which declared a number or namespaces and excluded a number of result prefixes.  This worked under 2.3.1 but produced NPE in 2.7.0 with stack trace of :-
> java.lang.NullPointerException
> 	at org.apache.xalan.transformer.TransformerImpl.setParameter(TransformerImpl.java:1558)
> 	at org.apache.xalan.transformer.TransformerImpl.setParameter(TransformerImpl.java:1606)
> 	at com.axa.framework.util.XSLEngineImpl.translate(XSLEngineImpl.java:140)
> 	at com.axa.framework.util.XSLEngineUtil.translate(XSLEngineUtil.java:79)
> 	at com.axa.framework.processor.EventProcessor.translate(EventProcessor.java:1198)
> 	at com.axa.framework.processor.EventProcessor.handleServiceEvent(EventProcessor.java:550)
> 	at com.axa.framework.processor.EventProcessor.process(EventProcessor.java:141)
> 	at com.axa.framework.processor.soap.RpcSOAPProcessorManager.handleEvent(RpcSOAPProcessorManager.java:83)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at com.axa.rpc.RpcThread.execute(RpcThread.java:240)
> 	at com.axa.rpc.RpcThread.run(RpcThread.java:135)
> The XSL stylesheet decalaration is :-
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
>                               xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" 
>                               xmlns:polphdr="http://www.polaris-uk.co.uk/GenericSchema/2_1/PEMHeader" 
>                               xmlns:java="http://xml.apache.org/xslt/java" 
>                               exclude-result-prefixes="axa soap-env java">
> The problem was resolved by removing axa from the list of namespaces.  Would have expected a more graceful throwing of the error or ignoring of the result prefix exclusion if the namespace cannot be determined.

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