Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3567,6 +3567,80 @@ and makes it clear when the state described by the flags is reset.

<!-- TODO: add examples -->

<h3 id="registries">Use registries to allow constrained extensions outside the original standards track</h3>

When you expect a feature to need to be extended over time,
and it would be inappropriate to
manage that change through the same standards process that defined the original feature,
then a registry is usually the right design.

[[spec-variability#variability|"Variability complicates interoperability."]]
When a feature needs optional components,
it is easiest to manage the complication if
a single group is in charge of the whole design.
This implies that most optional features should be defined
in the same specification that defined the original feature.

Sometimes new extensions are expected to be needed in the future.
In this case, the right plan is often to
have the original standards body continue or restart
a working group to produce an update to the feature's full specification.
Comment on lines +3585 to +3587
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In this case, the right plan is often to
have the original standards body continue or restart
a working group to produce an update to the feature's full specification.
It is often most appropriate
to have revise the specification to define an extension.
This can reduce or avoid any need to precisely define requirements for extensions.


However, if extensions need to be defined through
a different process than updating the full specification,
a registry is usually the right way to manage the known extensions.
Default to defining either
an IANA registry governed by [[RFC8126]] or a [[w3c-process#registries|W3C Registry]],
but another similar mechanism is also acceptable.
Comment on lines +3592 to +3594
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What other mechanism do you think might be appropriate? What criteria do you think apply to the selection of process?


Registries are helpful because they

1. Reduce name collisions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that you have a bullet list with commas, not periods...

Suggested change
1. Reduce name collisions.
* reduce name collisions,

1. Help readers find the name for a desired purpose.
1. Direct readers to a specification for each name
(if the registry requires this).

Items in a registry generally need to implement a defined interface
in order to plug into the specification they're extending.
The definition of the registry must be clear about this interface,
and it should require new entries to include a specification that follows it.
Comment on lines +3605 to +3606
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extension point that is governed by a registry needs to be fully-specified. That includes a definition of what to do if an item is not understood (is there a negotiation mechanism? is there feature detection? is the extension ignored when it is not understood? or, does it cause a failure of some sort?)

RFC 6709 goes into some detail about some of the extension models that might apply. Those are for protocols, but the same principles broadly apply to APIs as well.

Then, the requirements for what it takes to define the extension need to be clearly defined, as you say here.

This roughly corresponds to
the IETF's [[RFC8126#section-4.6|Specification Required]] registration policy.
It's difficult to be confident in an interface definition
before that interface has several implementations,
so any new registry should start with at least 2-3 entries defined.

It is tempting to additionally require that registry entries be
"good" in some way beyond simply being specified.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"good" in some way beyond simply being specified.
"good" in some way beyond what is needed to achieve interoperability.

Use a permissive registration policy instead of doing this
unless the feature includes
some way to enforce that no implementation can use an unregistered name.
The IETF has found that
when it's too hard to add entries to a registry,
implementers will often simply use names without registering them.
Comment on lines +3615 to +3620
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite the angle I'd use here. The extent to which you can add tighter constraints varies based on the ecosystem you are deploying into. If your implementers are browsers, then you might imagine that a tighter set of restrictions might be respected and therefore it would be more reasonable to at least try it on.

If you are looking at websites implementing, then you can almost guarantee that registrations won't happen, even if the constraints are very lightweight.

Getting that nuance in might be a good idea.


When a feature's main specification defines some initial registry entries,
each one can be either required or optional for implementations to recognize.
If implementations need to pick an understood registry entry to send to their recipients,
then the registry should include at least 1 required entry.
Comment on lines +3622 to +3625
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extensions for optional features - ones that are simply ignored if not understood - don't need this.

You should say that where the functioning of a specification depends on choosing and using an registered value, then you have three choices:

  • One party implements all the options.
  • You mandate a baseline that all parties implement.
  • Risk interoperability failure if the intersection of options between entities is empty.

And that's for a two-party negotiation. There are many things that the W3C documents where there are more than two potential actors involved.

If implementations can be
divided into distinct [[spec-variability#subdivision-profile|profiles]]
that tend not to need to communicate with other profiles,
it can be sufficient for each profile to require a registry entry
even if the main specification leaves them all optional.
Comment on lines +3626 to +3630
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not interoperability in the sense that we should care about here.

https://www.w3.org/TR/ethical-web-principles/#oneweb


It can be tempting to use URLs instead of registered strings to identify extensions.
This has the benefit of making it very easy to extend the feature,
by just picking a URL from a domain that the extender controls.
However, there's no way to ensure that
these URLs point to a specification for the extension they name,
or even that the domain stays under the control of the entity that defined the extension.
URLs are appropriate for a few kinds of completely-permissionless extension,
but most of the time a WG-managed permissive registry table will work better.
Comment on lines +3632 to +3639
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XML namespaces use URIs (not URLs). They are not using URIs for their ability to resolve to something; most XML namespace URIs, if they are resolved, point to nothing useful. You seem to imply that they could point to something; some do, but that's never been the goal.

They use URIs because the domain into which they are being deployed does not benefit from centralized coordination. They need identifiers and a way to generate them without coordination or - save us all - namecoin-style consensus. Indeed, it would be a mistake to require centralized coordination for those (doubly so for a wasteful distributed consensus). XML is a file format that is used by many people for many reasons. There is no value in asking people to coordinate identifier allocation. The same applies to JSON-LD, for similar reasons 1.

But the question we need to answer here is different. If you are specifying an extension to a protocol, why would you use a registry rather than letting the proverbial thousand flowers bloom? That all comes down to how you conceive of the interoperability goals of the extension point.

An optional, ignorable extension might benefit from a registry if there is a greater need to have different implementations agree on what the meaning of the extension is. In TLS, we have a registry for extensions, not just because there is a limited space available, but because the goal of defining an extension is to enable a shared understanding of the space.

In comparison, the IPTC metadata format uses URLs, because they don't see a need to constrain the space of options. There, the risk that people define multiple identifiers that are close, or even identical, in meaning is something that is tolerated so that there is a low-coordination way of adding metadata for limited or proprietary uses.

An extension point that determines everything that follows, like TLS ciphersuites or digital credential protocols, benefits more from coordination than something that can be readily ignored. Those are places where mandating implementation of a core by all (or a subset by browsers) is necessary.

Footnotes

  1. Even if you don't think that JSON-LD is solving a problem that matters, this choice is not one that is really in contention, to my mind.

Copy link
Member

@annevk annevk Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XML namespaces use strings that by convention often look like URLs and might parse as one, if we're going to quibble about details.


See [[qaframe-spec#extensions]] for
more guidance on how to design extensibility.
Comment on lines +3641 to +3642
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
See [[qaframe-spec#extensions]] for
more guidance on how to design extensibility.
See [[qaframe-spec#extensions]] and [[RFC6709]] for
more guidance on how to design extensibility.


<h3 id="implementability">Resolving tension between interoperability and implementability</h3>

<!--
Expand Down