FAILURE MAP
← Case archive

FA-3571 / Lexical grammars / Open access

A local XML name accepts a namespace colon · case 01

A local XML name accepts a namespace colon.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The recognizer uses '[A-Za-z_:][A-Za-z0-9_.:-]*', which admits or omits a token shape forbidden by the stated grammar.

VERIFIED REPAIR

Implement the complete stated contract, including the boundary fixtures: Accept a simplified local XML name: ASCII letter/underscore then letters/digits/underscore/dot/hyphen, no colon.

Unsuccessful approach: The candidate grammar '[A-Za-z_][A-Za-z0-9_]*' still disagrees with the explicit boundary fixtures.

Case contract

Accept a simplified local XML name: ASCII letter/underscore then letters/digits/underscore/dot/hyphen, no colon.

Why this case matters

A local executable model for consumers of structured text; oracle values are authored literals, not outputs copied from the repaired implementation.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap

N = 1
observations = []
def solve(x):
    try:
        return bool(re.fullmatch('[A-Za-z_:][A-Za-z0-9_.:-]*',x))
    except Exception as exc:
        return {"error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('a:b'), False)
check('boundary 2', solve('a-b'), True)
check('boundary 3', solve('_a.2'), True)
check('boundary 4', solve('2a'), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
boundary 1TrueFalseFailed
boundary 2TrueTruePassed
boundary 3TrueTruePassed
boundary 4FalseFalsePassed

SHA-256 / 8167430e277e5b5772327e340e26b5fde72136b52bd79a4579d7045b13873700

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap

N = 1
observations = []
def solve(x):
    try:
        return bool(re.fullmatch('[A-Za-z_][A-Za-z0-9_]*',x))
    except Exception as exc:
        return {"error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('a:b'), False)
check('boundary 2', solve('a-b'), True)
check('boundary 3', solve('_a.2'), True)
check('boundary 4', solve('2a'), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
boundary 1FalseFalsePassed
boundary 2FalseTrueFailed
boundary 3FalseTrueFailed
boundary 4FalseFalsePassed

SHA-256 / fc613ac70f659a3f50052d8f1c8d2c2f5168cd882e0254286bf7d4e621c1d8ce

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap

N = 1
observations = []
def solve(x):
    try:
        return bool(re.fullmatch('[A-Za-z_][A-Za-z0-9_.-]*',x))
    except Exception as exc:
        return {"error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('a:b'), False)
check('boundary 2', solve('a-b'), True)
check('boundary 3', solve('_a.2'), True)
check('boundary 4', solve('2a'), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
boundary 1FalseFalsePassed
boundary 2TrueTruePassed
boundary 3TrueTruePassed
boundary 4FalseFalsePassed

SHA-256 / fc9c7c699f55bf3d9c095be3a815bfec5468418cb4db61094ab8574d6590b1b6

Verification & scope

This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:37:27.913805+00:00.

Case digest / 2dc60eaca6139a94c1c8d55e7f2976dce8c4ea539097ef3c6f0c3160075ce3ad