[whatwg] making dfn.js work for multipage spec [was: Spec references in multipage]

Ian Hickson <ian at hixie.ch>, 2011-07-29 00:36 +0000:

> On Mon, 2 May 2011, Glenn Maynard wrote:
> >
> > This is probably a known issue, but the reference lists in the multipage 
> > version of the specs only list references within the same section of the 
> > spec.  Clicking "submitted" in [1] shows only two references.  Clicking 
> > the same thing in the single-page version shows nine.  It would be very 
> > helpful if external references were included.
> > 
> > [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#concept-form-submit
> 
> Yeah, this is the result of the dfn.js script only looking in the current 
> document. If anyone is interested in fixing this, let me know and I can 
> try to explain the problem space. (One solution is to change the spec 
> splitter to output data that a new dfn.js can use.)

I did make the dfn.js stuff work for the "Edition for Web Authors" subset
of the spec:

  http://dev.w3.org/html5/spec-author-view/

Example: click on the phrase "space characters" here:

  http://dev.w3.org/html5/spec-author-view/common-microsyntaxes.html#space-character

I did it by patching both anolis (to add a new filter) and the splitter code:

  http://dev.w3.org/cvsweb/html5/spec-author-view/patch.anolis?rev=HEAD;content-type=text%2Fplain
  http://dev.w3.org/cvsweb/html5/spec-author-view/patch.spec-splitter.1?rev=HEAD;content-type=text%2Fplain

It works -- and would also work for the full spec -- but I suspect there
probably has to be a better way to implement it than the way I did. Because
the way I did it very slow; it adds several minutes to the anolis part of
the document-building process. On the host I use for building the author
view of the spec, I think it causes the build to take 6 minutes or so to
run (compared to only a minute or two without it).

  --Mike

-- 
Michael[tm] Smith
http://people.w3.org/mike/+

Received on Saturday, 6 August 2011 01:06:14 UTC