Skip to content

Test case: write the slash in the FireRating pattern without a backslash - #467

Open
madsik wants to merge 1 commit into
buildingSMART:developmentfrom
madsik:testcase/plain-slash-in-pattern
Open

madsik wants to merge 1 commit into
buildingSMART:developmentfrom
madsik:testcase/plain-slash-in-pattern

Conversation

@madsik

@madsik madsik commented Nov 16, 2026

Copy link
Copy Markdown

The requirement of property/fail-properties_can_be_associated_to_relevant_object_types uses this pattern:

(-|[0-9]{2,3})\/(-|[0-9]{2,3})\/(-|[0-9]{2,3})

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.md and in the .ids, so the two stay the same. For engines that accepted \/ nothing changes: of the file's three FireRating values, -/-/- and 120/120/120 match and FOOBAR does 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 .ids line 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.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant