yesamer opened a new issue, #1051: URL: https://github.com/apache/incubator-kie-issues/issues/1051
This is a follow-up of https://github.com/apache/incubator-kie-issues/issues/1017 The same issue occurs when an XSD Element extends another Element with a defined sequence. To give an example, please consider the following xml ``` <dmn:businessKnowledgeModel id="_80847A66-F03E-4B81-B406-0E3B8D177EC8" name="normal"> <dmn:extensionElements/> <dmn:variable id="_1D5A641F-31EE-42FF-8DAD-D229A9A998BD" name="normal"/> <dmn:encapsulatedLogic id="_4A6C9D35-03DE-47F8-8ADD-6F15A27077A5" kind="FEEL"> .... ``` after the unmarshaller and marshaller phases, that is moved under the variable element: ``` <dmn:businessKnowledgeModel id="_80847A66-F03E-4B81-B406-0E3B8D177EC8" name="normal"> <dmn:variable id="_1D5A641F-31EE-42FF-8DAD-D229A9A998BD" name="normal"/> <dmn:extensionElements/> <dmn:encapsulatedLogic id="_4A6C9D35-03DE-47F8-8ADD-6F15A27077A5" kind="FEEL"> .... ``` Here is the definition of `tBusinessKnowledgeModel`: ``` <xsd:complexType name="tBusinessKnowledgeModel"> <xsd:complexContent> <xsd:extension base="tInvocable"> <xsd:sequence> <xsd:element name="encapsulatedLogic" type="tFunctionDefinition" minOccurs="0" maxOccurs="1"/> <xsd:element name="knowledgeRequirement" type="tKnowledgeRequirement" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="authorityRequirement" type="tAuthorityRequirement" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> ``` `tInvocable` extends `tDRGElement`: ``` <xsd:complexType name="tInvocable"> <xsd:complexContent> <xsd:extension base="tDRGElement"> <xsd:sequence> <xsd:element name="variable" type="tInformationItem" minOccurs="0"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> ``` `tDRGElement` extends `tNamedElement` that extends `tDMNElement` And here, `tDMNElement` definition that contains `extensionElements` ``` <xsd:complexType name="tDMNElement"> <xsd:sequence> <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/> <xsd:element name="extensionElements" minOccurs="0" maxOccurs="1"> <xsd:complexType> <xsd:sequence> <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> ``` That inheritance chain determines that the correct order is: - description - extensionElements - (other elements present in elements that extends tDMNElement) (eg. variable) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
