- From: Noam Rosenthal <notifications@github.com>
- Date: Mon, 09 Mar 2026 13:45:40 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/1454/review/3918112880@github.com>
@noamr commented on this pull request.
> +<div algorithm>
+<p>To <dfn>update attributes from data</dfn> for a {{ProcessingInstruction}} <a for=/>node</a>
+<var>pi</var>:
+
+<ol>
+ <li><p><a for=map>Clear</a> <var>pi</var>'s <a for=ProcessingInstruction>attribute map</a>.
+
+ <li><p>Let <var>context</var> be the result of <a>creating an element</a> given
+ <var>pi</var>'s <a>node document</a>, "<code>html</code>", and the <a>HTML namespace</a>.
+
+ <li><p>Let <var>markup</var> be the concatentation of "<code><attrs </code>",
+ <var>pi</var>'s <a for=CharacterData>data</a>, and
+ "<code>></attrs></code>".
+
+ <li><p>Let <var>fragment</var> be the result of invoking the
+ <a>fragment parsing algorithm steps</a> with <var>context</var> and <var>markup</var>.
Doesn't using the XML parser when it's an XML document solve it?
Sure it doesn't throw an XML parsing error, but it's not different from today when setting the `data` in an `xml-stylesheet` PI. If data doesn't resolve to attributes, it should remove all the pseudo-attributes in the XML case.
Using the context document for this makes attributes work for all practical purposes without changing current behaviour of XML PIs too much.
I don't entirely understand the reasoning behind opposing the "by context document" idea.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1454#discussion_r2907843232
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/dom/pull/1454/review/3918112880@github.com>
Received on Monday, 9 March 2026 20:45:44 UTC