Skip to content

Latest commit

 

History

History
1011 lines (794 loc) · 25.7 KB

testcases-attribute.md

File metadata and controls

1011 lines (794 loc) · 25.7 KB

Attribute testcases

These testcases are designed to help describe behaviour in edge cases and ambiguities. All valid IDS implementations must demonstrate identical behaviour to these test cases.

[FAIL] Invalid attribute names always fail

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Foobar</simpleValue>
  </name>
</attribute>
#1=IFCWALL('2Vizz8yS5EywnDdJXdANpX',$,$,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Attributes with a string value should pass

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
</attribute>
#1=IFCWALL('2YoHMx0RP22grn0OrtIn6U',$,'Foobar',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Attributes with null values always fail

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
</attribute>
#1=IFCWALL('1ci2Eqgw502hXqDUvVQB7I',$,$,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Attributes with empty strings always fail

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
</attribute>
#1=IFCWALL('2fsMZ$JM5ARQN6EjgQfWPI',$,'',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Attributes with a zero number have meaning and should pass

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>CountValue</simpleValue>
  </name>
</attribute>
#1=IFCQUANTITYCOUNT('Foobar',$,$,0.,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Attributes with a boolean true should pass

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>IsCritical</simpleValue>
  </name>
</attribute>
#1=IFCTASKTIME($,$,$,$,$,$,$,$,$,$,$,$,$,.T.,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Attributes with a boolean false should pass

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>IsCritical</simpleValue>
  </name>
</attribute>
#1=IFCTASKTIME($,$,$,$,$,$,$,$,$,$,$,$,$,.F.,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Attributes with an empty list always fail

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RelatingPriorities</simpleValue>
  </name>
</attribute>
#1=IFCWALL('1LJR0ZrUjDZv98VLM0xduS',$,$,$,$,$,$,$,$);
#2=IFCWALL('3YGPmGrGn0ueGPV1wEaQ6C',$,$,$,$,$,$,$,$);
#3=IFCRELCONNECTSPATHELEMENTS('0_LnguD312iOhijq9hoWj$',$,$,$,$,#1,#2,(),(),.ATSTART.,.ATEND.); /* Testcase */

Sample IDS - Sample IFC: 3

[FAIL] Attributes with an empty set always fail

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>LayerStyles</simpleValue>
  </name>
</attribute>
#1=IFCCARTESIANPOINT((0.,0.,0.));
#2=IFCPRESENTATIONLAYERWITHSTYLE('Foo',$,(#1),$,.T.,.F.,.F.,()); /* Testcase */

Sample IDS - Sample IFC: 2

[FAIL] Attributes with a logical unknown always fail

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>LayerOn</simpleValue>
  </name>
</attribute>
#1=IFCCARTESIANPOINT((0.,0.,0.));
#2=IFCPRESENTATIONLAYERWITHSTYLE('Foo',$,(#1),$,.U.,.F.,.F.,()); /* Testcase */

Sample IDS - Sample IFC: 2

[PASS] Attributes with a zero duration should pass

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>ScheduleDuration</simpleValue>
  </name>
</attribute>
#1=IFCTASKTIME($,$,$,$,'P0D',$,$,$,$,$,$,$,$,$,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Attributes referencing an object should pass

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>TaskTime</simpleValue>
  </name>
</attribute>
#1=IFCTASKTIME($,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$);
#2=IFCTASK('2AgPEiBgr0C9W_mzgojk4i',$,$,$,$,$,$,$,$,.T.,$,#1,$); /* Testcase */

Sample IDS - Sample IFC: 2

[PASS] Attributes with a select referencing an object should pass

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>DiffuseColour</simpleValue>
  </name>
</attribute>
#1=IFCCOLOURRGB($,1.,1.,1.);
#2=IFCCOLOURRGB($,1.,1.,1.);
#3=IFCSURFACESTYLERENDERING(#1,$,#2,$,$,$,$,$,.FLAT.); /* Testcase */

Sample IDS - Sample IFC: 3

[PASS] Attributes with a select referencing a primitive should pass

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>DiffuseColour</simpleValue>
  </name>
</attribute>
#1=IFCCOLOURRGB($,1.,1.,1.);
#2=IFCSURFACESTYLERENDERING(#1,$,IFCNORMALISEDRATIOMEASURE(0.5),$,$,$,$,$,.FLAT.); /* Testcase */

Sample IDS - Sample IFC: 2

[FAIL] Inverse attributes cannot be checked and always fail

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>EngagedIn</simpleValue>
  </name>
</attribute>
#1=IFCPERSON($,$,$,$,$,$,$,$); /* Testcase */
#2=IFCORGANIZATION($,'Foo',$,$,$);
#3=IFCPERSONANDORGANIZATION(#1,#2,$);

Sample IDS - Sample IFC: 1

[FAIL] Derived attributes cannot be checked and always fail

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Dim</simpleValue>
  </name>
</attribute>
#1=IFCCARTESIANPOINT((0.,0.,0.)); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Attributes should check strings case sensitively 1/2

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <simpleValue>Foobar</simpleValue>
  </value>
</attribute>
#1=IFCWALL('0BArK75T91pOs4E733AGKY',$,'Foobar',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Attributes should check strings case sensitively 2/2

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <simpleValue>Foobar</simpleValue>
  </value>
</attribute>
#1=IFCWALL('07qJ4oMzbDUuaz1lpex9Xf',$,'foobar',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Non-ascii characters are treated without encoding

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <simpleValue>♫</simpleValue>
  </value>
</attribute>
#1=IFCWALL('3Ivie0$SL3APN75VSARxgf',$,'\X2\266B\X0\',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Value checks always fail for objects

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>TaskTime</simpleValue>
  </name>
  <value>
    <simpleValue>Foobar</simpleValue>
  </value>
</attribute>
#1=IFCTASKTIME($,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$);
#2=IFCTASK('2LnkknVZ552f8PLYvQaN6O',$,$,$,$,$,$,$,$,.F.,$,#1,$); /* Testcase */

Sample IDS - Sample IFC: 2

[FAIL] Value checks always fail for selects

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>DiffuseColour</simpleValue>
  </name>
  <value>
    <simpleValue>Foobar</simpleValue>
  </value>
</attribute>
#1=IFCCOLOURRGB($,1.,1.,1.);
#2=IFCSURFACESTYLERENDERING(#1,$,IFCNORMALISEDRATIOMEASURE(0.5),$,$,$,$,$,.FLAT.); /* Testcase */

Sample IDS - Sample IFC: 2

[FAIL] Value checks always fail for lists

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Coordinates</simpleValue>
  </name>
  <value>
    <simpleValue>Foobar</simpleValue>
  </value>
</attribute>
#1=IFCCARTESIANPOINT((0.,0.,0.)); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] GlobalIds are treated as strings and not expanded

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>GlobalId</simpleValue>
  </name>
  <value>
    <simpleValue>1GOZ_Gs8n8_9EopghtCeh9</simpleValue>
  </value>
</attribute>
#1=IFCWALL('1GOZ_Gs8n8_9EopghtCeh9',$,$,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] IDS does not handle string truncation such as for identifiers

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Identification</simpleValue>
  </name>
  <value>
    <simpleValue>123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345_extra_characters</simpleValue>
  </value>
</attribute>
#1=IFCPERSON('123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345',$,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Numeric values are checked using type casting 1/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <simpleValue>42</simpleValue>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(42.,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Numeric values are checked using type casting 2/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <simpleValue>42.</simpleValue>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(42.,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Numeric values are checked using type casting 3/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <simpleValue>42.0</simpleValue>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(42.,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Numeric values are checked using type casting 4/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <simpleValue>42</simpleValue>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(42.3,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Only specifically formatted numbers are allowed 1/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <simpleValue>42,3</simpleValue>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(42.3,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Only specifically formatted numbers are allowed 2/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <simpleValue>123,4.5</simpleValue>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(1234.5,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Only specifically formatted numbers are allowed 3/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <simpleValue>1.2345e3</simpleValue>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(1234.5,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Only specifically formatted numbers are allowed 4/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <simpleValue>1.2345E3</simpleValue>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(1234.5,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Integers follow the same rules as numbers

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>NumberOfRisers</simpleValue>
  </name>
  <value>
    <simpleValue>42</simpleValue>
  </value>
</attribute>
#1=IFCSTAIRFLIGHT('0LY0GOwf53iPTW9nTOuVIu',$,$,$,$,$,$,$,42,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Integers follow the same rules as numbers 2/2

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>NumberOfRisers</simpleValue>
  </name>
  <value>
    <simpleValue>42.0</simpleValue>
  </value>
</attribute>
#1=IFCSTAIRFLIGHT('0wXBDJqhPAg9ltN6CuDcyo',$,$,$,$,$,$,$,42,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Integers are always floored when cast 1/2

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>NumberOfRisers</simpleValue>
  </name>
  <value>
    <simpleValue>42.3</simpleValue>
  </value>
</attribute>
#1=IFCSTAIRFLIGHT('0kWhBUS05BQ8qLePZ4VnJG',$,$,$,$,$,$,$,42,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Integers are always floored when cast 2/2

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>NumberOfRisers</simpleValue>
  </name>
  <value>
    <simpleValue>42.7</simpleValue>
  </value>
</attribute>
#1=IFCSTAIRFLIGHT('0DvrLfJ19ASRBx2Vl6hxIS',$,$,$,$,$,$,$,42,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Integers are always floored when cast 2/2

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>NumberOfRisers</simpleValue>
  </name>
  <value>
    <simpleValue>42.7</simpleValue>
  </value>
</attribute>
#1=IFCSTAIRFLIGHT('2LTNU5djTBSvAKqQzo3AVk',$,$,$,$,$,$,$,42,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Booleans must be specified as uppercase strings 1/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>IsMilestone</simpleValue>
  </name>
  <value>
    <simpleValue>TRUE</simpleValue>
  </value>
</attribute>
#1=IFCTASK('0b3YzCGv9F3e4eLk$EXZoA',$,$,$,$,$,$,$,$,.F.,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Booleans must be specified as uppercase strings 2/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>IsMilestone</simpleValue>
  </name>
  <value>
    <simpleValue>FALSE</simpleValue>
  </value>
</attribute>
#1=IFCTASK('0b3YzCGv9F3e4eLk$EXZoA',$,$,$,$,$,$,$,$,.F.,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Booleans must be specified as uppercase strings 2/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>IsMilestone</simpleValue>
  </name>
  <value>
    <simpleValue>False</simpleValue>
  </value>
</attribute>
#1=IFCTASK('0b3YzCGv9F3e4eLk$EXZoA',$,$,$,$,$,$,$,$,.F.,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Dates are treated as strings 1/2

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>EditionDate</simpleValue>
  </name>
  <value>
    <simpleValue>2022-01-01</simpleValue>
  </value>
</attribute>
#1=IFCCLASSIFICATION($,$,'2022-01-01','Name',$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Dates are treated as strings 1/2

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>EditionDate</simpleValue>
  </name>
  <value>
    <simpleValue>2022-01-01</simpleValue>
  </value>
</attribute>
#1=IFCCLASSIFICATION($,$,'2022-01-01+00:00','Name',$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Durations are treated as strings 1/2

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>ScheduleDuration</simpleValue>
  </name>
  <value>
    <simpleValue>PT16H</simpleValue>
  </value>
</attribute>
#1=IFCCLASSIFICATION($,$,'PT16H','Name',$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Durations are treated as strings 2/2

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>ScheduleDuration</simpleValue>
  </name>
  <value>
    <simpleValue>PT16H</simpleValue>
  </value>
</attribute>
#1=IFCCLASSIFICATION($,$,'P2D','Name',$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Name restrictions may be used 1/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <xs:restriction base="xs:string">
      <xs:pattern value=".*Name.*"/>
    </xs:restriction>
  </name>
</attribute>
#1=IFCMATERIALLAYER($,1.,$,$,$,$,$);
#2=IFCMATERIALLAYERSET((#1),'Foo',$); /* Testcase */

Sample IDS - Sample IFC: 2

[PASS] Name restrictions may be used 2/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <xs:restriction base="xs:string">
      <xs:pattern value=".*Name.*"/>
    </xs:restriction>
  </name>
</attribute>
#1=IFCMATERIALCONSTITUENTSET('Foo',$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Name restrictions may be used 3/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Name"/>
      <xs:enumeration value="Description"/>
    </xs:restriction>
  </name>
</attribute>
#1=IFCWALL('2TtYib0dnCUQqDHjptwLX4',$,'Foo',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Name restrictions may be used 4/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Name"/>
      <xs:enumeration value="Description"/>
    </xs:restriction>
  </name>
</attribute>
#1=IFCWALL('1S8xApCET8w9S760omQPYs',$,'Foo','Bar',$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Value restrictions may be used 1/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Foo"/>
      <xs:enumeration value="Bar"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('0QW83E8dL3ihw4AYsj9Qcm',$,'Foo',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Value restrictions may be used 2/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Foo"/>
      <xs:enumeration value="Bar"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('2XcEfWCIb3KOOEdE5i6uaB',$,'Bar',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Value restrictions may be used 3/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Foo"/>
      <xs:enumeration value="Bar"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('10NZQ5P352j96tQXmOHhdS',$,'Foobar',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Attributes are not inherited by the occurrence

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Foo"/>
      <xs:enumeration value="Bar"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('2bHWSH6Dn0CgF1Ba5F96IO',$,$,$,$,$,$,$,$); /* Testcase */
#2=IFCWALLTYPE('0bNYnETIr2RvLs0fl0B14I',$,$,'Foobar',$,$,$,$,$,.ELEMENTEDWALL.);
#3=IFCRELDEFINESBYTYPE('0dwZ8uEv58l8K8nI41pgtF',$,$,$,(#1),#2);

Sample IDS - Sample IFC: 1

[PASS] Typecast checking may also occur within enumeration restrictions

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:enumeration value="42"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(42.,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Strict numeric checking may be done with a bounds restriction

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:decimal">
      <xs:minInclusive value="42" fixed="false"/>
      <xs:maxInclusive value="42" fixed="false"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(42.,$); /* Testcase */

Sample IDS - Sample IFC: 1