W3C home > Mailing lists > Public > spec-prod@w3.org > July to September 2012

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

From: Robin Berjon <robin@berjon.com>
Date: Wed, 29 Aug 2012 11:38:05 +0200
Cc: Eliot Graff <Eliot.Graff@microsoft.com>, "spec-prod@w3.org" <spec-prod@w3.org>
Message-Id: <6BA46451-D907-4A1E-BD20-54C3D9D58795@berjon.com>
To: Travis Leithead <Travis.Leithead@microsoft.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 29 August 2012 09:38:37 GMT