-
Notifications
You must be signed in to change notification settings - Fork 70
cobigen xmlplugin
The CobiGen XML Plug-in currently only provides different merge mechanisms for XML result documents.
There are two merge strategies for XML documents, which can be configured in the templates.xml:
-
Merge strategy
javamerge
(merges two XML documents and keeps the existing XML elements on conflicts) -
Merge strategy
javamerge_override
(merges two XML documents and overrides the existing XML elements on conflicts)
As XML is a meta-language, it is not possible to compare all the different XML-based languages in a correct semanitcally way. Thus the current merge algorithm is based on some documents, which have been interesting to be merged in the past, like, spring bean specifications and xml specifications of named queries.
The current algorithms looks like this:
-
If the two elements declare an
id
attribute-
If the two elements declare an attribute
id
-
the value of the attribute
id
will be compared and result of the comparison
-
-
-
If the two element’s qualified name is "import"
-
If the two elements declare an attribute
resource
-
the value of the attribute
resource
will be compared and declared as the result of the comparison
-
-
-
If the two element’s qualified name is "query", "property", or "define"
-
If the two elements declare an attribute
name
-
the value of the attribute
name
will be compared and declared as the result of the comparison
-
-
-
If the two element’s qualified name is "transition"
-
If the two elements declare an attribute
on
-
the value of the attribute
on
will be compared and declared as the result of the comparison
-
-
-
If the two element’s qualified name is "outputLabel" or "message"
-
If the two elements declare an attribute
for
and an attributevalue
-
both values will be compared and declared as the result of the comparison
-
-
If the two elements only declare the attribute
for
-
the value of the attribute
for
will be compared and declared as the result of the comparison
-
-
-
If the two element’s parents are equal
-
the value text value will be compared and result of the comparison
-
-
All other elements will only be compared by the precondition (equal node name)
Disclaimer
If you discover any documentation bugs or would like to request new content, please raise them as an issue or create a pull request. Contributions to this wiki are done through the main repo under the folder documentation.
License
This documentation is licensed under the Creative Commons License (Attribution-NoDerivatives 4.0 International
)