You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "yesamer (via GitHub)" <gi...@apache.org> on 2024/03/27 17:11:08 UTC

[I] `@kie-tools/dmn-marshaller` not respecting `xsd:sequence` declaration order when an XSD Element extends another Element [incubator-kie-issues]

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: commits-unsubscribe@kie.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] `@kie-tools/dmn-marshaller` not respecting `xsd:sequence` declaration order when an XSD Element extends another Element [incubator-kie-issues]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on issue #1051:
URL: https://github.com/apache/incubator-kie-issues/issues/1051#issuecomment-2023457263

   @yesamer Hey! Nice catch. I feel stupid that I let it slide, as I had the same understanding as you do when I worked on #1017. I'll send a fix this week. Thanks for reporting it in detail @yesamer!


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] `@kie-tools/dmn-marshaller` not respecting `xsd:sequence` declaration order when an XSD Element extends another Element [incubator-kie-issues]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento closed issue #1051: `@kie-tools/dmn-marshaller` not respecting `xsd:sequence` declaration order when an XSD Element extends another Element
URL: https://github.com/apache/incubator-kie-issues/issues/1051


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org