MapML icon indicating copy to clipboard operation
MapML copied to clipboard

`<span>` not specified as allowed descendant of `<coordinates>`

Open Malvoz opened this issue 4 years ago • 3 comments

Coordinate positions can be wrapped in <span>s, as such the content model of <coordinates> should be updated to allow it.

Malvoz avatar Sep 11 '21 19:09 Malvoz

Going a bit off topic:

Span elements - as defined in HTML - can take phrasing content, so I guess MapML would have to define its own <span> that has a restricted content model for coordinate positions? That doesn't seem right, shouldn't something new be used instead of <span>?

Malvoz avatar Sep 11 '21 19:09 Malvoz

<span> is semantically neutral, AFAICT, so it would not be ideal to have to add a map-specific version of it, although we will have to update our schema and spec to include it, which might get messy, tbd.

prushforth avatar Sep 12 '21 14:09 prushforth

My concern is that we're reusing HTML elements although we expect them to behave or be used differently.

For example, <iframe> is phrasing content, where:

<p>
  <span><iframe></iframe></span>
</p>

is valid HTML.

But:

<coordinates>
  <span><iframe></iframe></span>
</coordinates>

is invalid MapML.

So <span> doesn't seem to be the same thing in HTML and MapML. SVG has <tspan>, why did they not (re)use and define <span>? Perhaps because its content model is different, and they wanted to avoid confusing authors/implementers?

I think this suggests we need a new <cspan> (coordinate span) element for use in <coordinate>.

Malvoz avatar Sep 12 '21 15:09 Malvoz