IDS icon indicating copy to clipboard operation
IDS copied to clipboard

Rejected property

Open CBenghi opened this issue 1 year ago • 1 comments

Question from @NickNisbet

Why are new properties rejected ? Surely IDS isn’t only for official properties?

Error 103: Invalid property name QualityOfComponentsGrade

   <ids:property datatype="IFCLABEL" minOccurs="1" maxOccurs="1">
          <ids:propertySet>
            <xs:restriction base="xs:string">
              <xs:pattern value="*." />
            </xs:restriction>
          </ids:propertySet>
          <ids:name>
            <ids:simpleValue>QualityOfComponentsGrade</ids:simpleValue>
          </ids:name>
          <ids:value>
            <xs:restriction>
              <xs:enumeration value="VERY LOW" />
              <xs:enumeration value="LOW" />
              <xs:enumeration value="TYPICAL" />
              <xs:enumeration value="HIGH" />
              <xs:enumeration value="VERY HIGH" />
              <xs:enumeration value="USERDEFINED" />
              <xs:enumeration value="NOTDEFINED" />
            </xs:restriction>
          </ids:value>
</ids:property>

(Actually this WAS an official property that someone has removed from the schema, which is a shame as it implements an ISO standard.)

Also: Error 401: Reserved prefix 'Pset_' for property set name (Pset_ManufacturerTypeInformation)

       <ids:property datatype="IFCLABEL">
          <ids:propertySet>
            <ids:simpleValue>Pset_ManufacturerTypeInformation</ids:simpleValue>
          </ids:propertySet>
          <ids:name>
            <ids:simpleValue>Manufacturer</ids:simpleValue>
          </ids:name>
        </ids:property>

Regards,

Nick.

CBenghi avatar Feb 05 '24 12:02 CBenghi

Hi Nick,

  1. I think that QualityOfComponentsGrade is rejected because the propertySetName is too broad.
  2. The second because buildingSMART insists that Pset_ is a reserved prefix. Only standard properties should have that name.

I will add a much clearer documentation to the audit logic once it's stable.

CBenghi avatar Feb 26 '24 23:02 CBenghi

The first, seems to trigger an error because .* might as well be 'Pset_'. I tried changing the pattern to Ps.* and it still triggers an error, but Psx.* already passes the audit. I am not sure how the Audit tool achieved this sophisticated precision (well done!), but I think it's better to be less conservative and not raise errors in such a case.

I'm closing here and opening an issue in the Audit repo.

The second, as @CBenghi said, is by intent.

Additionally, Nick, your pattern has a typo: *. should rather be .*.

atomczak avatar Aug 21 '24 18:08 atomczak