-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Lea asked for TAG guidance on the attribute naming relative to tref
specified for <link>. That inquiry led to some interesting directions for research and specification!
whatwg/urlpattern#73 is the original requirements issue for URLPattern URL creation, and https://github.com/explainers-by-googlers/urlpattern-generate is the explainer for the design of URLPattern.generate, the proposed implementation.
It seems like it might be possible and a good idea to replace the IETF RFC 6570 URI Templates Level 1 usage (e.g. https://tiles.example.org/osmtile/{z}/{x}/{y}
) in MapML with the WHATWG URLPattern.generate when the latter becomes widely available. In the meantime, the MapML draft might be updated to use the evolving generate
syntax, if no conflicts are uncovered.
Further, it's been recommended by the W3C TAG to use something like hrefpattern
or srcpattern
in place of tref
or tsrc
(they actually said template
, but adapting that to the revealed URLPattern
direction implies a pattern
suffix, I think), as the tsomething
may be confusing, and in fact inappropriate in the case of URLPattern. So at the same time we're updating to specify the use of URLPattern
patterns instead of URI templates, let's change the attribute name that is specified.
I'm still of the view that the <link> (or a new element altogether, which seems unlikely) is the correct element to target / specify for this new attribute, because:
a) both rel
and type
are important to the processing model
b) there's no 'alternate' resources implied here, only the eventually-linked resource