To Reproduce
Execute the unit test by the sample project on github, the unit test with name mappingFromXmlSchemaTest fail
````
mvn clean package
````
With the .adm (atlasmapping-from-xml-schema.adm) the wrong output is:
````
<?xml version="1.0" encoding="UTF-8"?>
<envelop xmlns="it.redhat.atlasmap.sample/env">
<customer xmlns="it.redhat.atlasmap.sample/customer">
<name xmlns="">Mario</name>
</customer>
</envelop>
````
Expected behavior
With the .adm (atlasmapping-from-xml-instance.adm) the right output is:
````
<?xml version="1.0" encoding="UTF-8"?>
<envelop xmlns:cus="it.redhat.atlasmap.sample/customer">
<cus:customer>
<cus:name>Mario</cus:name>
</cus:customer>
</envelop>
````
Additional Info
I unzipped the atlasmapping-from-xml-schema.adm and found that atlasmapping-UI.0.json contain wrong xpath expression for target xml.
I edited a new atlasmapping-UI.0.json and rezziped in a new atlasmapping-from-xml-schema-mod.adm.zip (just rezziped) modifying:
from:
````
...output omit...
"xmlNamespace" : [
{
"alias" : "cus",
"uri" : "it.redhat.atlasmap/customer"
}
,
{
"alias" : "tns",
"uri" : "it.redhat.atlasmap/env"
}
]
...output omit...
"path" : "/tns:envelop/cus:customer/name",
...output omit...
````
to:
````
...output omit...
"xmlNamespace" : [
{
"alias" : "cus",
"uri" : "it.redhat.atlasmap/customer"
}
]
...output omit...
"path" : "/envelop/cus:customer/cus:name",
...output omit...
````
and the output has correct namespace prefixs but log the following warning
````
[main] WARN io.atlasmap.xml.module.XmlModule - Declaration of the root element ':envelop' was not found in the schema
````
Environment
Atlas UI Version: atlasmap-standalone-2.4.0-M.4.jar
Atlasmap: Runtime Version: 2.4.0-M.4
JDK: openjdk version "11.0.2" 2019-01-15
OS: Macosx