Re: exporting xml elements to xref from respec?

Thanks François. Matt has, in the meantime, found the data-dfn-type stuff which he has used with success. But I did not know about [2]; indeed, respec seems to understand at least some of those entries.

Ivan

> On 20 Apr 2022, at 10:17, Francois Daoust <fd@w3.org> wrote:
> 
> Hi Ivan,
> 
> ------ Original message ------
> From: "Ivan Herman" <ivan@w3.org>
> To: "spec-prod" <spec-prod@w3.org>
> Cc: "Matt Garrish" <matt.garrish@gmail.com>
> Date: 13/04/2022 17:42:24
> 
>> The respec documentation says that one can export term definitions (ie, terms in an <dfn> element) by adding the class "export". So far so good and it works. However, it is not clear from the respec documentation whether the same class can be used to export an xml element defined in some xml application (or, for that matter, a json name in a json structure). Is there a way to do that?
> I'm not sure I understand what "an xml element defined in some xml application" is. If that is not "an xml element that a spec defines", could you share an example?
> 
> `<dfn>` can be used to define any kind of terms, including xml elements, json property names, values, etc. The `class="export"` mechanism will work for all of them.
> 
> The spec should make the definition type of a term explicit. ReSpec can determine the definition type automatically for IDL terms. It will need help for other types of terms, otherwise it will just fall back to a generic `dfn` type. The `data-dfn-type` attribute allows spec authors to specify the type. The ReSpec documentation seems a bit outdated on that attribute as it only mentions the generic `dfn` and `idl` values [1]. A more complete list, which I think ReSpec also supports, can be found in BikeShed's documentation [2].
> 
> In your case, for an xml element, you would use `data-dfn-type="element"`, which Matt seems to have added recently to the EPUB 3.3 spec. That seems all good to me.
> 
> Francois.
> 
> [1] https://respec.org/docs/#data-dfn-type
> [2] https://tabatkins.github.io/bikeshed/#dfn-types
> 
> 


----
Ivan Herman, W3C
Home: http://www.w3.org/People/Ivan/
mobile: +33 6 52 46 00 43

Received on Wednesday, 20 April 2022 08:41:32 UTC