Re: Case-sensitive <dfn> in ReSpec

> On Apr 4, 2017, at 7:35 AM, Martynas Jusevičius <martynas@atomgraph.com> wrote:
> 
> Hey all,
> 
> now I had time to try Shane's suggestion to use data-lt. I don't think
> it works. I have defined
> 
>  <dfn data-lt="iri-set">IRI</dfn>
> 
>  <dfn data-lt="iri-function">iri</dfn>
> 
> yet when I reference using <a data-lt="iri-function">iri</a>, the link
> that gets generated is #dfn-iri.
> 
> If I use a some other link text such as <a
> data-lt="iri-function">wtf</a>, then the link is correctly generated
> as #dfn-iri-function. But that is of no use for me.
> 
> Can you suggest a workaround?

I believe this effectively creates “iri-function” as an alias for #dfn-iri. If you don’t wan’t “iri” defined, you can use @data-lt-noDefault as follows:

<dfn data-lt=“iri-function” data-lt-noDefault>iri</dfn>

This defines #dfn-iri-function, but not #dfn-iri.

Gregg

> I am writing a specification that contains sets and set functions, so
> case-sensitivity is important and Web-IDL does not help. ReSpec is
> presented as a generic tool "for writing W3C specifications", so I
> don't think it should make assumptions that they will use Web-IDL.
> 
> On Thu, Dec 22, 2016 at 9:20 AM, Marcos Caceres <w3c@marcosc.com> wrote:
>> Hi Martynas,
>> 
>> On December 21, 2016 at 11:15:57 PM, Martynas Jusevičius
>> (martynas@atomgraph.com) wrote:
>>> Hey all,
>>> 
>>> I have two term definitions that differ in case:
>>> 
>>> Method - a set
>>> method - a set function
>>> 
>>> When I reference them using Method and method, the
>>> generated link always leads to the first definition.
>>> 
>>> Why is the matching case-insensitive?
>>> 
>>> And can I work around it somehow by adding explicit IDs? E.g. > id="method-set">Method, but I couldn't find an attribute that
>>> references @id.
>> 
>> you can disambiguate them by using dot notation:
>> 
>> <a>Interface.method</a>
>> 
>> You can also use:
>> 
>> <a data-link-for="Interface">method</method>
>> 
>> Or, even:
>> 
>> <a data-lt="Interface.method">method</method>
>> 
>> There are also some handy hints here:
>> https://github.com/w3c/respec/wiki/WebIDL-Guide
> 

Received on Wednesday, 5 April 2017 00:52:28 UTC