[
https://issues.apache.org/jira/browse/UIMA-5177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15748343#comment-15748343
]
Marshall Schor commented on UIMA-5177:
--------------------------------------
The fix for this is to change how the default namespace is indicated to the SAX
api content handler.
Already, the code is setting for each startElement call, the correct element
with the correct namespace.
The code incorrectly tried to add the default namespace using an attribute
named "xmlns" with the value = to the uri for the namespace, on the topmost
element. This "worked" for the implementation of SAX in core Java, but didn't
work for Saxon.
Remove this method and replace it with a call (before the first startElement
call) to the content handler's startPrefixMapping. This API takes two
arguments: the prefix, and the uri. In the case of setting up a "default"
namespace, use a prefix of the empty-string.
This approach works both for Saxon 8 and 9 and for the imbedded SAX
implementation in Java.
> NPEs occur if Saxon is in the classpath
> ---------------------------------------
>
> Key: UIMA-5177
> URL: https://issues.apache.org/jira/browse/UIMA-5177
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Reporter: Burn Lewis
> Assignee: Burn Lewis
> Priority: Minor
> Fix For: 3.0.0SDKexp, 2.10.0SDK
>
>
> The SAX startElement method and its attributes must use an empty string and
> not a null when the localName or qName is not provided.
> Found in UIMA-5126
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)