speced / bikeshed

:bike: A preprocessor for anyone writing specifications that converts source files into actual specs.
https://speced.github.io/bikeshed
Creative Commons Zero v1.0 Universal
1.1k stars 199 forks source link

No 'idl' refs found for ... #50

Closed dirkschulze closed 11 years ago

dirkschulze commented 11 years ago

I constantly get a FATAL ERROR: No 'idl' refs found for ... for IDL definitions I wrote my self. There is nothing wrong with the definition. Bikeshed should just ignore them.

How can I flag a section to be ignored?

tabatkins commented 11 years ago

Can you explain this more? Point me to some examples?

dirkschulze commented 11 years ago

Sure. One example is in the fxtf spec and masking-2:

<pre class="idl">interface <b>SVGMaskElement</b> : <a>SVGElement</a> {
  readonly attribute <a>SVGAnimatedEnumeration</a> <a href="#SVGMaskElement__maskUnits">maskUnits</a>;
  readonly attribute <a>SVGAnimatedEnumeration</a> <a href="#SVGMaskElement__maskContentUnits">maskContentUnits</a>;
  readonly attribute <a>SVGAnimatedLength</a> <a href="#SVGMaskElement__x">x</a>;
  readonly attribute <a>SVGAnimatedLength</a> <a href="#SVGMaskElement__y">y</a>;
  readonly attribute <a>SVGAnimatedLength</a> <a href="#SVGMaskElement__width">width</a>;
  readonly attribute <a>SVGAnimatedLength</a> <a href="#SVGMaskElement__height">height</a>;
};

<a>SVGMaskElement</a> implements <a>SVGUnitTypes</a>;</pre>

<dl class="interface">
</dd>
<dt class="attributes-header">Attributes:</dt>
<dd>
<dl class="attributes">

This code is half backed and will be completed by the SVG preprocessor to something like:

<pre class="idl">interface <b>SVGMaskElement</b> : <a href='http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGElement'>SVGElement</a> {
  readonly attribute <a href='http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedEnumeration'>SVGAnimatedEnumeration</a> <a href="#SVGMaskElement__maskUnits">maskUnits</a>;
  readonly attribute <a href='http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedEnumeration'>SVGAnimatedEnumeration</a> <a href="#SVGMaskElement__maskContentUnits">maskContentUnits</a>;
  readonly attribute <a href='http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedLength'>SVGAnimatedLength</a> <a href="#SVGMaskElement__x">x</a>;
  readonly attribute <a href='http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedLength'>SVGAnimatedLength</a> <a href="#SVGMaskElement__y">y</a>;
  readonly attribute <a href='http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedLength'>SVGAnimatedLength</a> <a href="#SVGMaskElement__width">width</a>;
  readonly attribute <a href='http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedLength'>SVGAnimatedLength</a> <a href="#SVGMaskElement__height">height</a>;
};

<a href='#InterfaceSVGMaskElement'>SVGMaskElement</a> implements <a href='http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGUnitTypes'>SVGUnitTypes</a>;</pre>

<dl class="interface">
</dd>
<dt class="attributes-header">Attributes:</dt>
<dd>
<dl class="attributes">

and this will be the input into Bikeshed.

tabatkins commented 11 years ago

Ah, that answers all the questions I had.

Bikeshed doesn't care about what markup you put into the <pre class=idl> beforehand. It wipes all that out and just processes the text with the webidlparser, then marks it all up over again by itself.

It appears that, for your case, you'd prefer it to leave your <pre> alone entirely, right?

An alternative is that you add the necessary SVG urls yourself (to the autolinker-defaults document in the CSSWG repo), and then just write plain IDL without any markup, and like Bikeshed take care of all of this for you.

dirkschulze commented 11 years ago

I may think about that. Wouldn't it still be wise to have a boolean attribute that tells bikeshed not to touch a certain element and its content?

tabatkins commented 11 years ago

If you want I can definitely add such a bool, at least for idl processing. Bikeshed has a lot of independent systems, so it would likely be annoying to try and come up with semantics for one that shuts down everything.

On Thu, Oct 3, 2013 at 2:36 PM, Dirk Schulze notifications@github.comwrote:

I may think about that. Wouldn't it still be wise to have a boolean attribute that tells bikeshed not to touch a certain element and its content?

— Reply to this email directly or view it on GitHubhttps://github.com/tabatkins/bikeshed/issues/50#issuecomment-25660317 .

tabatkins commented 11 years ago

Just put a data-no-idl attribute on your <pre>, and Bikeshed'll ignore it now.

(I need to document the whole IDL feature.)