Re: [whatwg/dom] Misalignment between spec and WPT for "validate and extract" (Issue #1387)

shannonbooth left a comment (whatwg/dom#1387)

> (no namespace, :foo):
>
> Previously: invalid character error.
> After my spec update: invalid character error. (prefix is the empty string so step 6 of "validate and extract" throws)
> @josepharhar's test/Chromium updates: valid.

The Chromium and WPT changes here are not valid, Chromium does not appear to be throwing based on https://wpt.fyi/results/dom/nodes/Document-createElementNS.html?label=experimental&label=master&aligned - https://github.com/web-platform-tests/wpt/pull/53533 fixes all such cases in WPT.


![Image](https://github.com/user-attachments/assets/c1b40d29-ae55-4f4a-8de3-fef7feea2177)

> (no-namespace, f::oo):
>
> Previously, namespace error.
> After my spec update: invalid character error. (localName is the empty string so step 7 of "validate and extract" throws)
@josepharhar's test/Chromium updates: invalid character error.

Chromium and WPT seem to be throwing a namespace error here:

![Image](https://github.com/user-attachments/assets/9aa20f54-2bb8-4605-864e-243e442c000b)


> (http://example.com/, f::oo):
> 
> Previously, valid.
> After my spec update: invalid character error. (localName is the empty string so step 7 of "validate and extract" throws)
@josepharhar's test/Chromium updates: valid.

![Image](https://github.com/user-attachments/assets/eeeff46f-0e24-4345-a452-adac15ca84d3)

WPT appears to expect these to not throw


One additional case is namespace of `http://example.com/` and  prefix of `f:o:o`. Spec seems to suggest there should be no `:` in the local name, but WPT and chromium appear to use everything after the first `:`

![Image](https://github.com/user-attachments/assets/500f64ec-7463-4c99-a863-55b7e7813d8a)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/1387#issuecomment-3030571911
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/issues/1387/3030571911@github.com>

Received on Thursday, 3 July 2025 03:58:59 UTC