mirror of
https://github.com/brunopostle/simple-ifc.git
synced 2026-03-30 06:53:18 +02:00
Document IDS ? wildcard gotcha in CLAUDE.md
This commit is contained in:
parent
2777eb04c8
commit
329fdb5afa
1 changed files with 23 additions and 0 deletions
23
CLAUDE.md
23
CLAUDE.md
|
|
@ -498,6 +498,29 @@ Use `should_purge: false` to add/update properties without removing existing one
|
||||||
|
|
||||||
**Known ifctester quirk with boolean applicability filters:** ifctester may flag elements even when their boolean property value does not match the applicability filter (e.g., an `IsExternal=True` wall being matched by an `IsExternal=False` filter). Treat the reported failing elements as authoritative — add whatever the requirement asks for, regardless of whether the applicability logic seems correct.
|
**Known ifctester quirk with boolean applicability filters:** ifctester may flag elements even when their boolean property value does not match the applicability filter (e.g., an `IsExternal=True` wall being matched by an `IsExternal=False` filter). Treat the reported failing elements as authoritative — add whatever the requirement asks for, regardless of whether the applicability logic seems correct.
|
||||||
|
|
||||||
|
**`<simpleValue>?</simpleValue>` is NOT a wildcard in ifctester — it matches the literal string `"?"`.**
|
||||||
|
To check that an attribute has any non-empty value, use an `xs:restriction` pattern instead:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<!-- WRONG — matches only the literal string "?" -->
|
||||||
|
<attribute>
|
||||||
|
<name><simpleValue>Name</simpleValue></name>
|
||||||
|
<value><simpleValue>?</simpleValue></value>
|
||||||
|
</attribute>
|
||||||
|
|
||||||
|
<!-- CORRECT — matches any non-empty string -->
|
||||||
|
<attribute>
|
||||||
|
<name><simpleValue>Name</simpleValue></name>
|
||||||
|
<value>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value=".+"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</value>
|
||||||
|
</attribute>
|
||||||
|
```
|
||||||
|
|
||||||
|
This applies to `<attribute>` requirements. The `xmlns:xs="http://www.w3.org/2001/XMLSchema"` namespace must be declared on the root `<ids>` element (it is in the standard IDS template).
|
||||||
|
|
||||||
### ifcopenshell.validate
|
### ifcopenshell.validate
|
||||||
|
|
||||||
Lower-level programmatic validation:
|
Lower-level programmatic validation:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue