Skip to content

New principle: Guidance for URL patterns and URL templates? #579

@LeaVerou

Description

@LeaVerou

Note

This may need to eventually be moved to https://github.com/w3ctag/gaps since it's unclear whether the solution is documenting the current situation or improving it.

This came up when discussing w3ctag/design-reviews#1123.
@mikewest proposed that MapML use URLPattern. I had suggested the same thing to @prushforth, to which he replied that MapML uses IETF's URI Template, a spec I wasn't familiar with but seemed a reasonable choice (my main worry at the time was that they had gone with a novel microsyntax).

So, to sum up, there are currently two related, but competing ways to describe patterns of URLs in the web platform:

It's unfortunate that these syntaxes are so vastly different, though generation vs matching do seem like sufficiently distinct purposes which could be used for framing guidance. OTOH @zcorpan brought up some issues with URI Template here.

So, the big picture question is: Does the web platform need to converge to a single syntax for both?
Is the solution to add syntax to accommodate generation to URLPattern and then just guide authors towards that, or do we need a principle to steer spec authors towards either based on their use case?

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