W3C home > Mailing lists > Public > spec-prod@w3.org > October to December 2012

Adding "Foo implements Bar;" declarations in ReSpec IDL

From: James Craig <jcraig@apple.com>
Date: Thu, 06 Dec 2012 22:00:05 -0800
Message-id: <53E6863B-6B16-4865-85F3-B35A8CD61851@apple.com>
To: "spec-prod@w3.org" <spec-prod@w3.org>
Two questions:

1. What's the right way to do this? 
2. Shouldn't ReSpec only try to parse dl[class="idl"] instead of *[class="idl"] ?


Since ReSpec does not support things like declarations outside the interface block…

	partial interface Foo {
	};
	Foo implements Bar;


…I attempted inserted a preformatted block.

	<pre class="idl"><span class="idlInterface" id="idl-def-Foo">partial interface <span class="idlInterfaceID">Foo</span> {
	};
	<span class="idlInterfaceID">Foo</span> implements <span class="idlInterfaceID">Bar</span>;</span></pre>


Unfortunately, ReSpec chokes on the "idl" classname. I need the 'idl' classname for the styles, so I tried using a ReSpec formatter. 

	<script class="remove">
	function preformattedIDL(r, content) {
		return '<pre class="idl">' +content+ '</pre>';
	};
	</script>
	<div data-transform="preformattedIDL"><span class="idlInterface" id="idl-def-Foo">partial interface <span class="idlInterfaceID">Foo</span> {
	};
	<span class="idlInterfaceID">Foo</span> implements <span class="idlInterfaceID">Bar</span>;</span></div>


This inserts the node correctly, so it gets the WebIDL block and inline styles, but ReSpec then tries to parse the newly inserted contents and chokes again on the 'idl' classname.


Thanks in advance.
James
Received on Friday, 7 December 2012 06:00:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 7 December 2012 06:00:52 GMT