[Edapt] Unmodeled XML attributes got lost during migration [message #1767855] |
Tue, 11 July 2017 11:44  |
Eclipse User |
|
|
|
Hi @all,
I want to migrate an EMF model, which tolerates unmodeled XML attributes during deserialization and serialization.
Background: Our customers use their own XML attributes to store custom information in their model files.
I'm using the model serialization mapping options "OPTION_KEEP_DEFAULT_CONTENT" and "OPTION_RECORD_UNKNOWN_FEATURE" in my ResourceFactory:
public class MyResourceFactoryImpl extends ResourceFactoryImpl {
// ...
@Override
public Resource createResource(URI uri) {
XMLResource result = (XMLResource) createResourceGen(uri);
result.getDefaultSaveOptions()
.put(XMLResource.OPTION_KEEP_DEFAULT_CONTENT, Boolean.TRUE);
result.getDefaultLoadOptions()
.put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
// ...
return result;
}
// ...
}
We didn't need migration until now and for the default use case (editing XML files with unmodeled attributes without losing those) this worked just fine. But now we have to do some migration with Edapt and these attributes got lost when saving the XML file after the migration process. Is there any way to convince Edapt about keeping those attributes?
Thanks in advance,
Sebastian
|
|
|
|
Re: [Edapt] Unmodeled XML attributes got lost during migration [message #1768410 is a reply to message #1767981] |
Tue, 18 July 2017 08:24  |
Eclipse User |
|
|
|
Thanks, Jonas, that's good to know. I would like to contribute such a feature, but currently we don't have the capacities and the feature is not important enough for us. But if you can tell me some entry points where such feature can be implemented, I would be grateful. The tool is a great help for us, so if I can manage it, I would like to give something back.
For a first start, is there any process to improve the documentation?
And last but not least a question related to the topic: Does Edapt support keeping of XML comments from the unmigrated XML representation to the new one? And if so, how is it done?
|
|
|
Powered by
FUDForum. Page generated in 0.09436 seconds