Repository navigation
Conversation
The pattern of property/fail-properties_can_be_associated_to_relevant_object_types
was (-|[0-9]{2,3})\/(-|[0-9]{2,3})\/(-|[0-9]{2,3}). In XML Schema regular
expressions (SingleCharEsc) "\/" is not an escape, and "/" needs none.
libxml2 since 2.10, Java 8's Xerces, xmlschema and .NET read "\/" as "/",
but libxml2 before 2.10 and any checker that follows the grammar refuse
the pattern, and the case then reads as invalid instead of fail. Where
"\/" was accepted it meant "/", so for those engines nothing changes.
The entry in scripts.md and the .ids change together.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This simple PR is flagging up a couple of things for me:
I'd recommend we simplify the IFC test file (a variation on fail-properties_can_be_overriden_by_an_occurrence_2_2.ifc is probably enough), and we should add a test case that passes when checking properties on IfcObjectType. |
|
Thanks, Andy, good points. I checked the IFC: wall type DEMO1 has no property set at all, so the file fails on the missing FireRating before the pattern is ever tested, while scripts.md says it fails only because of This PR only makes the existing .ids valid against the XML Schema regex grammar, where For the rest I'd suggest a follow-up PR:
If you'd rather have it all in this PR, I can add it here instead. Which do you prefer? Prepared with the help of Claude. I have read every line and will answer the review myself. |
The requirement of property/fail-properties_can_be_associated_to_relevant_object_types uses this pattern:
In XML Schema regular expressions
\/is not an escape: SingleCharEsc allows only\n \r \t \\ \| \. \? \* \+ \( \) \{ \} \- \[ \] \^, and/needs no escape. Many engines read\/as/anyway: libxml2 2.11.9 (it accepts it since 2.10, as a non-standard escape), the Xerces built into Java 8, xmlschema 4.2.0, and .NET's Regex, which the IDS-Audit-tool uses. libxml2 before 2.10 refuses the pattern ("Wrong escape sequence"), and so does any checker that follows the grammar. For those, this IDS is invalid and the case comes out as invalid instead of fail, for a reason that has nothing to do with what it tests.This pull request writes the slash plainly, in the entry in
scripts.mdand in the.ids, so the two stay the same. For engines that accepted\/nothing changes: of the file's three FireRating values,-/-/-and120/120/120match andFOOBARdoes not, so the expected result stays fail. IfcOpenShell made the same change in its ids_doc_generator.py in March 2026 (IfcOpenShell/IfcOpenShell@77f0c43).I could not run the .NET build here, so I edited the
.idsline by hand. Reading the generator, it copies the pattern text as written, so regenerating should give the same file.Prepared with the help of Claude. I have read every line and will answer the review myself.