Re: Is there a way in respec to hyperlink to external refs?

On Aug 29, 2012, at 00:05 , Travis Leithead wrote:
> Actually, I want to deep-link to specific definitions within HTML5/DOM4.

That feature isn't supported yet, but it's in the pipeline for "after 3.2" (probably as part of updating the bibref system). The data is available from http://webref.herokuapp.com/index.html (it is shared with Anolis). It is indeed very useful.

I will take patches ;)

> But these links only work in-document. Anolis appears to support this:
>  
> <var data-anolis-spec=html title=concept-frag-parse-context>context</var>

Yes it does, which is why we have the data for it. I have to admit that I don't like the Anolis syntax for it much though — it's almost as verbose as including the link!

I can live with the Anolis syntax if it's what everyone prefers, but I have thought of other possible syntaxes for it (in decreasing order of preference).

1) Import-based

• Somewhere in at the top, in a section like "Terminology" for instance (where specA, specB, etc. are short identifiers for the specifications and dfn1, dfn2 are short IDs for the definitions):

<p data-import-dfn>specA/dfn1 specB/dfn2 specC/*</p>

which would generate output (that could be hidden if preferred) along the lines of:

In this specification,
- Term 1 is defined in Specification A
- Term 2 is defined in Specification B
- Foo, bar, blah are defined in Specification C

• And then, when you want to refer to those definitions you do so using the exact same syntax as for internal ones (<a>dnfX</a>) — the system just links them up differently.


2) Scheme-based

Just extend the current way of referring to definitions — which is simply <a>dfn-name</a> — with a magical scheme. So referring to a definition in another spec would just be <a href='spec:dom4'>Node</a> or <a href='spec:dom4#node'>the Node interface</a>. Yes, it violates WebArch. It's a source format, though, so I don't think that matters (send the Architecture Police!).

3) Shorter Anolis

Maybe using data-spec would work — I just don't think that attribute names for author formats should be sixteen characters long :)

-- 
Robin Berjon - http://berjon.com/ - @robinberjon

Received on Wednesday, 29 August 2012 09:38:36 UTC