Bug 17890 - xml:base and xml:space allowed on foreign elements, but also forbidden
xml:base and xml:space allowed on foreign elements, but also forbidden
Status: RESOLVED FIXED
Product: WHATWG
Classification: Unclassified
Component: HTML
unspecified
Other other
: P3 normal
: Unsorted
Assigned To: Ian 'Hixie' Hickson
contributor
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-18 07:13 UTC by contributor
Modified: 2012-08-24 19:02 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description contributor 2012-07-18 07:13:01 UTC
This was was cloned from bug 17745 as part of operation convergence.
Originally filed: 2012-07-11 15:28:00 +0000
Original reporter: Henry S. Thompson <ht@inf.ed.ac.uk>

================================================================================
 #0   Henry S. Thompson                               2012-07-11 15:28:03 +0000 
--------------------------------------------------------------------------------
Is it a terminology issue, or a deeper problem, that we have both

  When a _foreign element_ has one of the namespaced attributes given by
  the local name and namespace of the first and second cells of a row
  from the following table, it must be written using the name given by
  the third cell from the same row. . . xml:base . . . xml:space

  [Section 8.1.2.3 Attributes, in Section 8 The HTML Syntax]

but also

  Authors must not use the xml:base attribute in _HTML documents_.

  [Section 3.2.3.5 The xml:base attribute (XML only)]

?

That is, the former appears to allow xml:base on foreign elements,
while the latter appears to forbid it.  Please clarify this in the
spec. one way or the other --- our preference would be for the xml:
attributes to be allowed on foreign elements.

Submitted on behalf of the XML Core WG
================================================================================
 #1   Simon Pieters                                   2012-07-11 16:48:09 +0000 
--------------------------------------------------------------------------------
I think they should be allowed on HTML elements as well. They can be set by script, and xml:base might well be useful.
================================================================================
Comment 1 Ian 'Hixie' Hickson 2012-08-24 19:01:31 UTC
>   When a _foreign element_ has one of the namespaced attributes given by
>   the local name and namespace of the first and second cells of a row
>   from the following table, it must be written using the name given by
>   the third cell from the same row. . . xml:base . . . xml:space

This doesn't say whether the attribute is allowed or not, just what syntax must be used if it is present.

Whether the attributes in question are allowed or not is up to the specifications that define the elements in question (namely, SVG for SVG elements, MathML for MathML elements, and HTML for HTML elements).

I've added a clarifying note to this effect.


>   Authors must not use the xml:base attribute in _HTML documents_.

This was written before HTML documents contained SVG and MathML nodes in the text/html serialisation. I've updated this text to refer just to HTML elements.
Comment 2 contributor 2012-08-24 19:02:24 UTC
Checked in as WHATWG revision r7267.
Check-in comment: Narrow the scope of the xml:base ban to HTML elements. If SVG wants to allow them, e.g., that's up to them.
http://html5.org/tools/web-apps-tracker?from=7266&to=7267