]
Matteo Mortari updated DROOLS-2372:
-----------------------------------
Attachment: screenshot-1.png
[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.