I have a question/discussion about the preferred use of the measure attribute in a property element.
We have the units list in the documentation with the preferred values. And on the one hand, the measure attribute is mandatory. On the other hand, there are properties without units/physical dimension. For example, property values from an enum list are strings (IfcLabel), currency values are float numbers (IfcReal) or for quantities there is the datatype Q_COUNT (IfcInteger).
There is no formal strict domain for the measure attribute, so it's possible to use e.g. measure="IfcLabel". But IfcLabel, IfcReal, IfcInteger etc. are not really measure types but data types. And for data types, we have the XML data type restriction with base.
Now we have (at least) two ways to write an IDS for a property with IfcLabel values:
<property ... measure="IfcLabel">
(with or without a base restriction in the value element)
or
<property ... measure=""> (empty string for measure attribute is allowed with the current XSD)
...
<ids:value>
<xs:restriction base="xs:string">
...
What is the preferred usage for IDS 0.9.3/1.0?
I think both are not very nice. The first variant mixes measure and data types. And with an additional base restriction the data type information is redundant. The second variant has an empty measure attribute, which I guess I no longer need to explain why that's not nice.
I propose for IDS 1.1* to make the measure attribute optional (perhaps restrict its values to the pattern "Ifc...Measure") and always specify elementary data types as an XML restriction (with base) if the measure attribute is missing. So, for IfcLabel it would be the second variant without the (empty) measure attribute.
I have a question/discussion about the preferred use of the
measureattribute in apropertyelement.We have the units list in the documentation with the preferred values. And on the one hand, the
measureattribute is mandatory. On the other hand, there are properties without units/physical dimension. For example, property values from an enum list are strings (IfcLabel), currency values are float numbers (IfcReal) or for quantities there is the datatypeQ_COUNT(IfcInteger).There is no formal strict domain for the
measureattribute, so it's possible to use e.g.measure="IfcLabel". ButIfcLabel,IfcReal,IfcIntegeretc. are not really measure types but data types. And for data types, we have the XML data type restriction withbase.Now we have (at least) two ways to write an IDS for a property with
IfcLabelvalues:<property ... measure="IfcLabel">(with or without a
baserestriction in thevalueelement)or
<property ... measure="">(empty string formeasureattribute is allowed with the current XSD)...<ids:value><xs:restriction base="xs:string">...What is the preferred usage for IDS 0.9.3/1.0?
I think both are not very nice. The first variant mixes measure and data types. And with an additional
baserestriction the data type information is redundant. The second variant has an emptymeasureattribute, which I guess I no longer need to explain why that's not nice.I propose for IDS 1.1* to make the
measureattribute optional (perhaps restrict its values to the pattern"Ifc...Measure") and always specify elementary data types as an XML restriction (withbase) if themeasureattribute is missing. So, forIfcLabelit would be the second variant without the (empty)measureattribute.