[jboss-jira] [JBoss JIRA] (DROOLS-2372) [DMN Editor] Marshalling/unmarshalling of QNames is broken

Matteo Mortari (JIRA) issues at jboss.org
Mon Mar 12 07:39:02 EDT 2018


    [ https://issues.jboss.org/browse/DROOLS-2372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13544433#comment-13544433 ] 

Matteo Mortari commented on DROOLS-2372:
----------------------------------------

Thanks [~jomarko] but the file does not help me understand which problem is there with the marshaller. 

In fact, I did a quick roundtrip test and the output is compatible with the original file:
 !screenshot-1.png|thumbnail! 
with the only difference in the end of line before the EOF.

Naturally, this model cannot be executed, so the test would fail if I try to compile this model and evaluate it, but besides of this difference which is not in the scope of this JIRA, from my side the marshaller with the file provided seems to be working correctly for me?

I think this is better to be discussed later at the DMN checkpoint meeting with [~manstis]

> [DMN Editor] Marshalling/unmarshalling of QNames is broken
> ----------------------------------------------------------
>
>                 Key: DROOLS-2372
>                 URL: https://issues.jboss.org/browse/DROOLS-2372
>             Project: Drools
>          Issue Type: Bug
>          Components: DMN Editor
>            Reporter: Michael Anstis
>            Assignee: Matteo Mortari
>         Attachments: reproducer.dmn, screenshot-1.png
>
>
> The workbench creates QName {{"\{http://www.drools.org/kie/dmn/1.1\}kind"}} for {{FunctionDefinition}}'s {{Kind}} and value (for example) {{F}}. This is marshalled by {{FunctionDefinitionPropertyConverter}} to DMN XML. When unmarshalled by the same class the workbench QName becomes {{"drools:feel"}} with value (for example) {{F}}.
> I don't understand why the prefix/local name substitution on the unmarshalling occurs; nor why the workbench is creating a DMN NameSpace Context entry on the {{FunctionDefinition}} for {{drools:http://www.drools.org/kie/dmn/1.1"}}.. I also don't know whether the prefix/local part was used before [~tari_manga] found the string encoding format of {{"\{http://www.drools.org/kie/dmn/1.1\}kind"}} and the unmarshalling has not been updated?
> I can blindly change {{MarshallingUtils}} to ignore prefix/local part and just use the {{javax.xml.namespace.QName#toString()}} method but it'd be foolhardy doing so without understanding the marshalling/unmarshalling better.



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list