Issues exporting terms
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 806
- Forks
- 434
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 32
Description
We just went through the process of exporting terms/elements/attributes from the EPUB 3.3 specification, so wanted to share a few of the issues we ran into:
First, it would really help to have the element and element-attr definition types documented. I didn't realize these existed until I was looking up the exported terms in the xref database and followed some html examples through to the source markup.
Second, it's not clear when or how data-dfn-for works for elements and attributes. It appears for attributes you can specify tbe element name and then you can reference as [^elem/attr^]. This is incredibly useful for avoiding naming collisions, but it doesn't appear to work well for elements. The EPUB specification defines multiple grammars - package document, media overlays, container file, etc. These grammars have some elements whose names collide, but I couldn't find a way to make data-dfn-for work to indicate that elements belong to different grammars.
For example, if I put data-dfn-for="package" on the package document's metadata element and data-dfn-for="smil" on the media overlays version, I was able to write [^package/metadata^] and [^smil/metadata^] internally, but the definitions didn't export so in any other document I'd get a message that the element "metadata" for "package" was not defined in any referenced specifications.
In the end, I had to skip defining the lesser-used elements to avoid collisions.
Third, is it a bug that you can't use the <a data-lt="..."> syntax for attributes or a missing feature? For example, writing [^script/src^] is fine but <a data-lt="script/src"> results in an error.
In any case, the [^...^] syntax would be helpful to note in the linking shorthands section. I didn't spot the link to the other shorthands after the example, so it confused me initially when you use [=...=] and when [^...^].
That's everything I can think of right now. Any other issues I missed @iherman?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linking shorthands section in the Respec documentation and reproduce the EPUB export examples using element, element-attr, data-dfn-for, and data-lt. Trace the generated definitions through the xref database and source markup. Done means the requested behavior is clarified or supported and the relevant definition types and shorthand syntax are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100