这是indexloc提供的服务,不要输入任何密码
Skip to content

Replace IETF URI templates with WHATWG URLPattern, implement according to baseline availability #264

@prushforth

Description

@prushforth

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions