Skip to content

Commit

Permalink
Improved audit tool and related IDS fixes. (#292)
Browse files Browse the repository at this point in the history
* Adjusted string encoding of boolean values to XML

According to XML standard documentation.

* Updated audit tool library and fixed IDS files

Test case and development files have been adjusted to
address new issues discovered by tool.
A number of cases previously listed as fail are now marked invalid.
  • Loading branch information
CBenghi committed May 6, 2024
1 parent d484120 commit 2966051
Show file tree
Hide file tree
Showing 33 changed files with 67 additions and 67 deletions.
2 changes: 1 addition & 1 deletion Development/IDS_SimpleBIM_examples.ids
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<ids:simpleValue>IsExternal</ids:simpleValue>
</ids:baseName>
<ids:value>
<ids:simpleValue>TRUE</ids:simpleValue>
<ids:simpleValue>true</ids:simpleValue>
</ids:value>
</ids:property>
</ids:applicability>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<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/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS">
<info>
<title>Booleans must be specified as uppercase strings 1/3</title>
<title>Booleans must be specified as lowercase strings 1/3</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="Booleans must be specified as uppercase strings 1/3" ifcVersion="IFC2X3 IFC4">
<specification name="Booleans must be specified as lowercase strings 1/3" ifcVersion="IFC2X3 IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
Expand All @@ -19,7 +19,7 @@
<simpleValue>IsMilestone</simpleValue>
</name>
<value>
<simpleValue>TRUE</simpleValue>
<simpleValue>true</simpleValue>
</value>
</attribute>
</requirements>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<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/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS">
<info>
<title>Booleans must be specified as uppercase strings 2/3</title>
<title>Booleans must be specified as lowercase strings 2/3</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="Booleans must be specified as uppercase strings 2/3" ifcVersion="IFC2X3 IFC4">
<specification name="Booleans must be specified as lowercase strings 2/3" ifcVersion="IFC2X3 IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<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/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS">
<info>
<title>Integers follow the same rules as numbers 2/2</title>
<title>Integers cannot be expressed as floating point numbers 2/2</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="Integers follow the same rules as numbers 2/2" ifcVersion="IFC4">
<specification name="Integers cannot be expressed as floating point numbers 2/2" ifcVersion="IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<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/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS">
<info>
<title>Specifying a float when the value is an integer will fail</title>
<title>Specifying a float when the value is an integer is invalid</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="Specifying a float when the value is an integer will fail" ifcVersion="IFC4">
<specification name="Specifying a float when the value is an integer is invalid" ifcVersion="IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<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/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS">
<info>
<title>Booleans must be specified as uppercase strings 2/3</title>
<title>Booleans must be specified as lowercase strings 2/3</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="Booleans must be specified as uppercase strings 2/3" ifcVersion="IFC2X3 IFC4">
<specification name="Booleans must be specified as lowercase strings 2/3" ifcVersion="IFC2X3 IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
Expand All @@ -19,7 +19,7 @@
<simpleValue>IsMilestone</simpleValue>
</name>
<value>
<simpleValue>False</simpleValue>
<simpleValue>false</simpleValue>
</value>
</attribute>
</requirements>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<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/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS">
<info>
<title>Booleans must be specified as uppercase strings 1/3</title>
<title>Booleans must be specified as lowercase strings 1/3</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="Booleans must be specified as uppercase strings 1/3" ifcVersion="IFC2X3 IFC4">
<specification name="Booleans must be specified as lowercase strings 1/3" ifcVersion="IFC2X3 IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
Expand All @@ -22,7 +22,7 @@
<simpleValue>Foo</simpleValue>
</baseName>
<value>
<simpleValue>TRUE</simpleValue>
<simpleValue>true</simpleValue>
</value>
</property>
</requirements>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<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/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS">
<info>
<title>Booleans must be specified as uppercase strings 2/3</title>
<title>Booleans must be specified as lowercase strings 3/3</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="Booleans must be specified as uppercase strings 2/3" ifcVersion="IFC2X3 IFC4">
<specification name="Booleans must be specified as lowercase strings 3/3" ifcVersion="IFC2X3 IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<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/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS">
<info>
<title>Integer values are checked using type casting 2/4</title>
<title>Integer values cannot be stored with decimal 2/4</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="Integer values are checked using type casting 2/4" ifcVersion="IFC2X3 IFC4">
<specification name="Integer values cannot be stored with decimal 2/4" ifcVersion="IFC2X3 IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<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/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS">
<info>
<title>Integer values are checked using type casting 3/4</title>
<title>Integer values cannot be stored with decimal 3/4</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="Integer values are checked using type casting 3/4" ifcVersion="IFC2X3 IFC4">
<specification name="Integer values cannot be stored with decimal 3/4" ifcVersion="IFC2X3 IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<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/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS">
<info>
<title>Booleans must be specified as uppercase strings 3/3</title>
<title>Booleans must be specified as lowercase strings 2/3</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="Booleans must be specified as uppercase strings 3/3" ifcVersion="IFC2X3 IFC4">
<specification name="Booleans must be specified as lowercase strings 2/3" ifcVersion="IFC2X3 IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
Expand All @@ -22,7 +22,7 @@
<simpleValue>Foo</simpleValue>
</baseName>
<value>
<simpleValue>False</simpleValue>
<simpleValue>false</simpleValue>
</value>
</property>
</requirements>
Expand Down
82 changes: 41 additions & 41 deletions Documentation/testcases/scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,31 +214,31 @@ Requirements:
Attribute: ''Name''
```

### Booleans must be specified as uppercase strings 1/3
### Booleans must be specified as lowercase strings 1/3

``` ids attribute/fail-booleans_must_be_specified_as_uppercase_strings_1_3.ids
Booleans must be specified as uppercase strings 1/3
``` ids attribute/fail-booleans_must_be_specified_as_lowercase_strings_1_3.ids
Booleans must be specified as lowercase strings 1/3
Entity: ''IFCTASK''
Requirements:
Attribute: ''IsMilestone'',''TRUE''
Attribute: ''IsMilestone'',''true''
```

### Booleans must be specified as uppercase strings 2/3
### Booleans must be specified as lowercase strings 2/3

``` ids attribute/fail-booleans_must_be_specified_as_uppercase_strings_2_3.ids
Booleans must be specified as uppercase strings 2/3
``` ids attribute/invalid-booleans_must_be_specified_as_lowercase_strings_2_3.ids
Booleans must be specified as lowercase strings 2/3
Entity: ''IFCTASK''
Requirements:
Attribute: ''IsMilestone'',''False''
Attribute: ''IsMilestone'',''FALSE''
```

### Booleans must be specified as uppercase strings 2/3
### Booleans must be specified as lowercase strings 2/3

``` ids attribute/pass-booleans_must_be_specified_as_uppercase_strings_2_3.ids
Booleans must be specified as uppercase strings 2/3
``` ids attribute/pass-booleans_must_be_specified_as_lowercase_strings_2_3.ids
Booleans must be specified as lowercase strings 2/3
Entity: ''IFCTASK''
Requirements:
Attribute: ''IsMilestone'',''FALSE''
Attribute: ''IsMilestone'',''false''
```

### Dates are treated as strings 1/2
Expand Down Expand Up @@ -355,10 +355,10 @@ Requirements:
Attribute: ''NumberOfRisers'',''42''
```

### Integers follow the same rules as numbers 2/2
### Integers cannot be expressed as floating point numbers 2/2

``` ids attribute/pass-integers_follow_the_same_rules_as_numbers_2_2.ids
Integers follow the same rules as numbers 2/2
``` ids attribute/invalid-integers_cannot_be_expressed_as_floating_point_numbers_2_2.ids
Integers cannot be expressed as floating point numbers 2/2
IFC4
Entity: ''IFCSTAIRFLIGHT''
Requirements:
Expand Down Expand Up @@ -459,7 +459,7 @@ Attribute: ''RefractionIndex'',''42''

### Only specifically formatted numbers are allowed 1/4

``` ids attribute/fail-only_specifically_formatted_numbers_are_allowed_1_4.ids
``` ids attribute/invalid-only_specifically_formatted_numbers_are_allowed_1_4.ids
Only specifically formatted numbers are allowed 1/4
Entity: ''IFCSURFACESTYLEREFRACTION''
Requirements:
Expand All @@ -468,7 +468,7 @@ Attribute: ''RefractionIndex'',''42,3''

### Only specifically formatted numbers are allowed 2/4

``` ids attribute/fail-only_specifically_formatted_numbers_are_allowed_2_4.ids
``` ids attribute/invalid-only_specifically_formatted_numbers_are_allowed_2_4.ids
Only specifically formatted numbers are allowed 2/4
Entity: ''IFCSURFACESTYLEREFRACTION''
Requirements:
Expand All @@ -493,12 +493,12 @@ Requirements:
Attribute: ''RefractionIndex'',''1.2345E3''
```

### Specifying a float when the value is an integer will fail
### Specifying a float when the value is an integer is invalid

Note that the attribute name `NumberOfRiser` has been renamed to `NumberOfRisers` in IFC4

``` ids attribute/fail-specifying_a_float_when_the_value_is_an_integer_will_fail.ids
Specifying a float when the value is an integer will fail
``` ids attribute/invalid-specifying_a_float_when_the_value_is_an_integer_is_invalid.ids
Specifying a float when the value is an integer is invalid
IFC4
Entity: ''IFCSTAIRFLIGHT''
Requirements:
Expand Down Expand Up @@ -2066,31 +2066,31 @@ Requirements:
Property: ''Pset_WallCommon'',''Status'',IFCLABEL,''NEW''
```

### Booleans must be specified as uppercase strings 1/3
### Booleans must be specified as lowercase strings 1/3

``` ids property/fail-booleans_must_be_specified_as_uppercase_strings_1_3.ids
Booleans must be specified as uppercase strings 1/3
``` ids property/fail-booleans_must_be_specified_as_lowercase_strings_1_3.ids
Booleans must be specified as lowercase strings 1/3
Entity: ''IFCWALL''
Requirements:
Property: ''Foo_Bar'',''Foo'',IFCBOOLEAN,''TRUE''
Property: ''Foo_Bar'',''Foo'',IFCBOOLEAN,''true''
```

### Booleans must be specified as uppercase strings 2/3
### Booleans must be specified as lowercase strings 2/3

``` ids property/pass-booleans_must_be_specified_as_uppercase_strings_2_3.ids
Booleans must be specified as uppercase strings 2/3
``` ids property/pass-booleans_must_be_specified_as_lowercase_strings_2_3.ids
Booleans must be specified as lowercase strings 2/3
Entity: ''IFCWALL''
Requirements:
Property: ''Foo_Bar'',''Foo'',IFCBOOLEAN,''FALSE''
Property: ''Foo_Bar'',''Foo'',IFCBOOLEAN,''false''
```

### Booleans must be specified as uppercase strings 3/3
### Booleans must be specified as lowercase strings 3/3

``` ids property/fail-booleans_must_be_specified_as_uppercase_strings_3_3.ids
Booleans must be specified as uppercase strings 3/3
``` ids property/invalid-booleans_must_be_specified_as_lowercase_strings_3_3.ids
Booleans must be specified as lowercase strings 3/3
Entity: ''IFCWALL''
Requirements:
Property: ''Foo_Bar'',''Foo'',IFCBOOLEAN,''False''
Property: ''Foo_Bar'',''Foo'',IFCBOOLEAN,''FALSE''
```

### Complex properties are not supported 1/2
Expand Down Expand Up @@ -2246,27 +2246,27 @@ Requirements:
Property: ''Foo_Bar'',''Foo'',IFCINTEGER,''42''
```

### Integer values are checked using type casting 2/4
### Integer values cannot be stored with decimal 2/4

``` ids property/pass-integer_values_are_checked_using_type_casting_2_4.ids
Integer values are checked using type casting 2/4
``` ids property/invalid-integer_values_cannot_be_stored_with_decimal_2_4.ids
Integer values cannot be stored with decimal 2/4
Entity: ''IFCWALL''
Requirements:
Property: ''Foo_Bar'',''Foo'',IFCINTEGER,''42.''
```

### Integer values are checked using type casting 3/4
### Integer values cannot be stored with decimal 3/4

``` ids property/pass-integer_values_are_checked_using_type_casting_3_4.ids
Integer values are checked using type casting 3/4
``` ids property/invalid-integer_values_cannot_be_stored_with_decimal_3_4.ids
Integer values cannot be stored with decimal 3/4
Entity: ''IFCWALL''
Requirements:
Property: ''Foo_Bar'',''Foo'',IFCINTEGER,''42.0''
```

### Integer values are checked using type casting 4/4

``` ids property/fail-integer_values_are_checked_using_type_casting_4_4.ids
``` ids property/invalid-integer_values_are_checked_using_type_casting_4_4.ids
Integer values are checked using type casting 4/4
Entity: ''IFCWALL''
Requirements:
Expand Down Expand Up @@ -2302,7 +2302,7 @@ Property: ''Foo_Bar'',''Foo'',IFCLABEL,''♫Don'tÄrgerhôtelЊет''

### Only specifically formatted numbers are allowed 1/4

``` ids property/fail-only_specifically_formatted_numbers_are_allowed_1_4.ids
``` ids property/invalid-only_specifically_formatted_numbers_are_allowed_1_4.ids
Only specifically formatted numbers are allowed 1/4
Entity: ''IFCWALL''
Requirements:
Expand All @@ -2311,7 +2311,7 @@ Property: ''Foo_Bar'',''Foo'',IFCREAL,''42,3''

### Only specifically formatted numbers are allowed 2/4

``` ids property/fail-only_specifically_formatted_numbers_are_allowed_2_4.ids
``` ids property/invalid-only_specifically_formatted_numbers_are_allowed_2_4.ids
Only specifically formatted numbers are allowed 2/4
Entity: ''IFCWALL''
Requirements:
Expand Down
2 changes: 1 addition & 1 deletion build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="6.3.0" />
<PackageReference Include="ids-tool.CommandLine" Version="1.0.73" />
<PackageReference Include="ids-tool.CommandLine" Version="1.0.74" />
<PackageDownload Include="dotnet-xscgen" Version="[2.1.1094]" />
</ItemGroup>

Expand Down

0 comments on commit 2966051

Please sign in to comment.