[respec] Automatic conversion between WebIDL oldschool and contiguous

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[respec] Automatic conversion between WebIDL oldschool and contiguous

Dominique Hazael-Massieux-2
Hi,

As alluded before [1], the modern and correct way of writing WebIDL with
respec is to use the so-called "contiguous" mode rather than the
"oldschool" one.

As transitioning between the two can require quite a bit of work with
specs with lots of WebIDL, I've built [2] a respec profile that can help
(attached).

To use it:
* replace the link to the respec script by a link to that special profile
* save the generated document as the new source for your respec
* re-replace the respec link with the normal respec profile
* fix anchors and auto-links as needed

I have tested this only with one spec so far, and I'm not volunteering
to maintain and publish that profile much beyond the usage I'll have for
it in the upcoming few weeks; but I thought I would mention it in case
others are facing the same conversion needs.

Dom

1. https://lists.w3.org/Archives/Public/spec-prod/2015JulSep/0032.html
2. https://github.com/dontcallmedom/respec/commits/oldschool2contiguous

respec-webidlconvert.js (205K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [respec] Automatic conversion between WebIDL oldschool and contiguous

Shane McCarron
Clever!

On Thu, Dec 10, 2015 at 11:10 AM, Dominique Hazael-Massieux <[hidden email]> wrote:
Hi,

As alluded before [1], the modern and correct way of writing WebIDL with respec is to use the so-called "contiguous" mode rather than the "oldschool" one.

As transitioning between the two can require quite a bit of work with specs with lots of WebIDL, I've built [2] a respec profile that can help (attached).

To use it:
* replace the link to the respec script by a link to that special profile
* save the generated document as the new source for your respec
* re-replace the respec link with the normal respec profile
* fix anchors and auto-links as needed

I have tested this only with one spec so far, and I'm not volunteering to maintain and publish that profile much beyond the usage I'll have for it in the upcoming few weeks; but I thought I would mention it in case others are facing the same conversion needs.

Dom

1. https://lists.w3.org/Archives/Public/spec-prod/2015JulSep/0032.html
2. https://github.com/dontcallmedom/respec/commits/oldschool2contiguous



--
Shane McCarron
Managing Director, Applied Testing and Technology, Inc.