What if we only standardize on the UUID://...//
syntax, allowing authors to embed it anywhere in a file? The Treaty could recommend that HTML authors put it in a <meta property=ifiction:ifid
> tag like this:
<meta property="ifiction:ifid" content="UUID://448E73DF-2D2F-47E7-A494-A46B40D4CFB3//">
The Babel tool could just search for the UUID://...//
syntax in HTML files, allowing the UUID://...//
to appear anywhere, including in a comment.
This would have the benefit of getting us out of the business of parsing HTML by regex! (Except for <tw-storydata>
, but that’s a particularly trivial case to parse, and we have working code already.)
(Also, your draft version of the Treaty proposes that the UUID://...//
syntax would be valid for HTML games, but upthread, you were musing that perhaps it would/should be supported for all story files. If so, do we wanna amend the Treaty to say that?)
I don’t think that xmlns
is right in this case.
xmlns
was the XHTML way to add new tags and attributes to XHTML, and it might make sense to use it if we were asking people to use a colon-prefixed custom tag (like <ifiction:ifid>
) or a custom attribute (<meta ifiction:ifid="xxxx">
), but xmlns
is irrelevant in our case, because the <meta>
tag is already intended to support custom metadata in its attribute’s values, like this:
<meta name="whatever you like" content="custom value">
Now, the subtlety here is that there are two competing ways to put custom metadata in <meta>
tags. The WHATWG HTML standard recommends that you just make up a custom name
attribute, like <meta name="ifiction.ifid">
, but W3C recommends RDFa, in which you use a property
attribute instead of a name
attribute, with a colon-prefixed value, like <meta property="ifiction:ifid">
. RDFa then adds a prefix
attribute that associates the ifiction:
prefix with an URL.
RDFa’s prefix
attribute is philosophically similar to xmlns
, but since prefix
is namespacing the value of an attribute, xmlns
doesn’t actually apply.
(Note that WHATWG, the team who maintains the HTML standard, has been feuding with W3C for at least 10 years; the teams aren’t talking to each other, and even contradict one another. The RDFa property
and prefix
attributes (as well as vocab
, resource
, and typeof
) appear in a W3C standard https://www.w3.org/TR/rdfa-lite/ but none of the RDFa attributes are even documented in the WHATWG HTML standard or MDN. https://html.spec.whatwg.org/multipage/ Also, RDFa is intended to apply to any element in the file, kinda like microdata, but HTML already has microdata attributes itemscope
itemprop
and itemtype
.)
When I wrote my initial proposal, I picked RDFa because that’s what Facebook used for their Open Graph tags https://ogp.me/
<html prefix="og: https://ogp.me/ns#">
<head>
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock" />
It seemed easy and lightweight to me, especially since the prefix
attribute is optional.
Regardless, I claim that the prefix
should use the https://
version of the URL, https://babel.ifarchive.org/protocol/iFiction/ and not the http://
version http://babel.ifarchive.org/protocol/iFiction/.
(Many major historical xmlns
values used http://
, e.g. xmlns="http://www.w3.org/1999/xhtml"
, but I claim that’s because they were defined in the 20th century. In hindsight, they should have used https://
even then.)