-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple matched Attributes #279
Comments
I think the test is fine. pass-name_restrictions_will_match_any_result_2_3.ids is essentially saying "All IfcWalls require either the Name or Description attribute to have a value". The IDS Restrictions docs suggest enumeration restrictions should be read as an 'OR' / OneOf / AnyOf restriction. Not an 'AND' / AllOf. But you raise an interesting question. If the Attribute Name has a restriction that satisfies multiple Attributes, and the Value is also specified/constrained on the requirement, do all the attributes have to satisfy that value requirement? The text seems to indicate All should. But there's no test I can find to assert this. e.g. given this IFC
Should this IDS pass or fail? <specification name="For all Walls, Name OR Description value must be Bar" ifcVersion="IFC2X3 IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
<simpleValue>IFCWALL</simpleValue>
</name>
</entity>
</applicability>
<requirements>
<attribute>
<name>
<xs:restriction base="xs:string">
<xs:enumeration value="Name" />
<xs:enumeration value="Description" />
</xs:restriction>
</name>
<value>
<simpleValue>Bar</simpleValue>
</value>
</attribute>
</requirements>
</specification> In our implementation this would pass, but I can see some could interpret differently. But if you wanted to test 'For all Walls, Name AND Description value must be Bar' you could specify two Attribute facets |
What happened when change Name restriction from enumeration to Regex "Name|Description"? |
Simple value or restriction - for me its just a way to go from IFC file to target property (attribute, classification and etc.) |
Don't Restrictions just express different types of 'predicate' in a filter/where clause? i.e. in pseudocode: simpleValue : They just codify part of a requirement in more sophisticated ways than a simple equality test. But I think we're getting away from the original issue. Probably worth restating what you think the problem is? It sounds like facet-configurations.md may need some clarifications/edits? |
From facet-configuration:
My question: |
I'd agree it's confusing to have these inconsistencies. Especially when not backed up by some reference test cases. As we're seeing it just creates ambiguity for authors and implementors. I've not been party to the design meetings but I think the changes came out of PR #240 quite recently. In particular Facet-configuration is new and looks like work in progress and not necessarily consistent with the test cases. I'm coincidentally in a meeting with @CBenghi this afternoon so will get his view |
From facet-configurations:
NAME: The Attribute should be populated (i.e. not null) (this is different from the Property facets, which accepts a null)
NAME/VALUE: all matching attributes must match the value constraints (excludes null)
Look at test pass-name_restrictions_will_match_any_result_2_3.
It passed. So, looks like for multiple attributes text above should be 'NAME: The ANY OF AttributeS should be populated (i.e. not null)'
Is it wrong test? If not, why NAME/VALUE case use 'ALL' word and different from NAME case.
The text was updated successfully, but these errors were encountered: