buildingSMART / IDS-Audit-tool

Official buildingSMART tool to audit the validity of a .ids file (according to the full IDSxml standard).
MIT License
19 stars 8 forks source link

partOf without entity #12

Closed giuseppeverduciALMA closed 8 months ago

giuseppeverduciALMA commented 1 year ago

IDS-Audit-tool reports this error:

Error 106: Invalid empty attribute "entity" on "partOf at line 17, position 18

with this ids:

<ids xmlns="http://standards.buildingsmart.org/IDS"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://standards.buildingsmart.org/IDS http://standards.buildingsmart.org/IDS/ids_09.xsd">
    <info>
        <title>An optional facet always passes regardless of outcome 2/2</title>
    </info>
    <specifications>
        <specification name="An optional facet always passes regardless of outcome 2/2" ifcVersion="IFC2X3 IFC4" minOccurs="1" maxOccurs="unbounded">
            <applicability>
                <entity>
                    <name>
                        <simpleValue>IFCWALL</simpleValue>
                    </name>
                </entity>
            </applicability>
            <requirements>
                <partOf relation="IfcRelAggregates" minOccurs="0" maxOccurs="unbounded" />
            </requirements>
        </specification>
    </specifications>
</ids>

The ids schema allows a "partOf" to be declared without an "entity" element, with only the "relation" attribute

CBenghi commented 1 year ago

Since 0.9.6 that's not the case; entity has minoccurs set at 1.

<xs:complexType name="partOfType">
  <xs:sequence>
    <xs:element name="entity" type="ids:entityType" minOccurs="1" />
  </xs:sequence>
  <xs:attribute name="relation" type="ids:relations" />
</xs:complexType>