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 7 forks source link

Attribute AddressLines can't have a restriction #46

Open atomczak opened 1 month ago

atomczak commented 1 month ago

Based on the example from https://github.com/buildingSMART/IDS/discussions/363, it looks like the attribute restriction in IFC 2x3 on 'AddressLines' doesn't allow any base type. It appears that restrictions are not allowed on this attribute 🤔

I suspect it has to do with IDS Audit tool not processing the fact that 'AddressLines' is a list, not a single-value property.

I expect that it should accept base="xs:string".

Example:


<ids: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/1.0/ids.xsd" xmlns:ids="http://standards.buildingsmart.org/IDS">
  <ids:info>
    <ids:title>example</ids:title>
  </ids:info>
  <ids:specifications>
    <ids:specification ifcVersion="IFC2X3" name="example">
        <ids:applicability minOccurs="1" maxOccurs="unbounded">
            <ids:entity>
                <ids:name>
                    <ids:simpleValue>IFCPOSTALADDRESS</ids:simpleValue>
                </ids:name>
            </ids:entity>
        </ids:applicability>
        <ids:requirements>
            <ids:attribute>
                <ids:name>
                    <ids:simpleValue>AddressLines</ids:simpleValue>
                </ids:name>
                <ids:value>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="xxxxx"/>
                        <xs:enumeration value="yyyyy"/>
                        <xs:enumeration value="zzzz"/>
                    </xs:restriction>
                </ids:value>
            </ids:attribute>
        </ids:requirements>
    </ids:specification>
  </ids:specifications>
</ids:ids>```
atomczak commented 1 month ago

Found out that it's probably because IFCPOSTALADDRESS is not an allowed entity (not a child of IfcObject). If so, that should be the warning, and not that base type is wrong.