Giter VIP home page Giter VIP logo

Comments (3)

pmai avatar pmai commented on July 22, 2024

Hi Irina, the schema is actually correct, as far as I can see, in that fmi3Enumeration is an extension of fmi3MandatorilyTypedInitializableVariable, which is an extension of fmi3MandatorilyTypedArrayableVariable, which is an extension of fmi3TypedArrayableVariable, which is an extension of fmi3ArrayableVariable which has the Dimension elements, which is again an extension of fmi3AbstractVariable, which has the Annotations element.

I don't know where the second diagram is coming from, but it seems that that program does not show the inherited/extension base content, but only the added content, leading to the confusion?

from fmi-standard.

IZacharias avatar IZacharias commented on July 22, 2024

Hi Pierre, I think there is a bug in fmi3MandatorilyTypedArrayableVariable. It is not an extension of fmi3TypedArrayableVariable but fmi3TypedArrayableVariable is specified as restriction:

<xs:complexType name="fmi3MandatorilyTypedArrayableVariable" abstract="true">
        <xs:complexContent>
            <xs:restriction base="fmi3TypedArrayableVariable">
                <xs:attribute name="declaredType" type="xs:normalizedString" use="required"/>
            </xs:restriction>
        </xs:complexContent>
    </xs:complexType>

I guess that this would be correct:

<xs:complexType name="fmi3MandatorilyTypedArrayableVariable" abstract="true">
	<xs:complexContent>
		<xs:extension base="fmi3TypedArrayableVariable">
			<xs:attribute name="declaredType" type="xs:normalizedString" use="required"/>
		</xs:extension>
	</xs:complexContent>
</xs:complexType>

But then the declaredType attribute must be treated in a different way.

from fmi-standard.

pmai avatar pmai commented on July 22, 2024

Hi Irina,

there is indeed a bug in the definition, however it should be a restriction (otherwise the use required would not be allowed/make sense); the real bug is that somewhere along the line the non-attribute content was not/no longer repeated in the restriction, as it should have been... probably my bad...

the fix would look like this:

    <xs:group name="fmi3Dimensions">
        <xs:sequence>
            <xs:element name="Dimension" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:attribute name="start" type="xs:unsignedLong"/>
                    <xs:attribute name="valueReference" type="xs:unsignedInt"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:group>
    <xs:complexType name="fmi3ArrayableVariable" abstract="true">
        <xs:complexContent>
            <xs:extension base="fmi3AbstractVariable">
                <xs:group ref="fmi3Dimensions"/>
                <xs:attribute name="intermediateUpdate" type="xs:boolean"/>
                <xs:attribute name="previous" type="xs:unsignedInt"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    ...
    <xs:complexType name="fmi3MandatorilyTypedArrayableVariable" abstract="true">
        <xs:complexContent>
            <xs:restriction base="fmi3TypedArrayableVariable">
                <xs:sequence>
                    <xs:element ref="Annotations" minOccurs="0"/>
                    <xs:group ref="fmi3Dimensions"/>
                </xs:sequence>
                <xs:attribute name="declaredType" type="xs:normalizedString" use="required"/>
            </xs:restriction>
        </xs:complexContent>
    </xs:complexType>

I'll create a PR...

from fmi-standard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.