Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal refs cannot begin with < but external ones can #4806

Open
nigelmegitt opened this issue Sep 24, 2024 · 1 comment
Open

Internal refs cannot begin with < but external ones can #4806

nigelmegitt opened this issue Sep 24, 2024 · 1 comment
Labels

Comments

@nigelmegitt
Copy link
Contributor

nigelmegitt commented Sep 24, 2024

Description of problem

If a term definition begins with < then Respec generates an error

Example:

<p>Some random <dfn><code>&lt;ltterm</code></dfn>. Ref the <a><code>&lt;ltterm</code></a>.</p>

generates an error:

ReSpec doesn't support expanding this kind of reference.

and in the "Terms defined by this specification" section, a term called #dfn-ltterm is generated, which does correctly link back to the definition.

However, an external reference like:

<dfn data-cite="TTML2#profile-vocabulary-extension"><code>&lt;ttp:extension&gt;</code></dfn>

gets correctly expanded in the "Terms defined by reference" section to:

[TTML2] defines the following:

  • <ttp:extension>

What happened:

Instead of listing the defined term an error message was generated, and unexpected text appeared where the defined term should be in the "Terms defined by this specification" section.

Expected behavior:

The defined term should appear, with the < at the beginning, and no error should be generated.

It is the same without the <code> element

Just in case, I tried removing the <code> element around the term, and the behaviour was exactly the same.

@nigelmegitt
Copy link
Contributor Author

Example spec processing failure at https://github.com/w3c/dapt/actions/runs/11023589971/job/30615154823?pr=241 includes in the log:

  Error: ROR] ReSpec doesn't support expanding this kind of reference.
         Count: 1
        Plugin: core/anchor-expander
      [INFO] [Timeout: 17098ms] Done.
      [FATAL] Error: Errors found during processing.
          at run (file:///home/runner/work/_actions/w3c/spec-prod/v2/node_modules/.pnpm/[email protected][email protected]/node_modules/respec/tools/respec2html.js:268:11)
          at async file:///home/runner/work/_actions/w3c/spec-prod/v2/node_modules/.pnpm/[email protected][email protected]/node_modules/respec/tools/respec2html.js:215:5
    Command `respec -s "http://localhost:3000/index.html?gitRevision=362102d68d401b3285b916bc6c1ec2f55738aba6" -o "index.html.built.html" --verbose -t 20 -e` failed with exit code: 1.

nigelmegitt added a commit to w3c/dapt that referenced this issue Sep 25, 2024
Move the term inside the angle brackets, which makes it harder to find in the index of terms, but fixes the Respec error.
nigelmegitt added a commit to w3c/dapt that referenced this issue Sep 28, 2024
Move the term inside the angle brackets, which makes it harder to find in the index of terms, but fixes the Respec error.
nigelmegitt added a commit to w3c/dapt that referenced this issue Sep 28, 2024
* Remove Script Event Type, use Represents instead

* Merge registry table entries for `eventType` and `<content-descriptor>` (removing the `eventType` registry)
* Extract definition of Represents into the Shared Properties section
* Remove Script Event Type
* Make Represents an optional property of Script Event and move example that was in Script Event Type up into Script Event under the Represents bullet
* Add _permitted_ `#represents-div` feature
* Update class diagram to remove Script Event Type and add Represents to Script Event

* fix validation error

* Fix lwsp requirement bug

Fix to be one or more, was zero or more.

* Iterate design following discussion

Separate scriptRepresents from represents as applied to Script Events.

Define usage constraints.

Define the syntax of `<content-descriptor>` to allow for generic validity checking without needing to understand the contents of the values used.

Update the feature extensions and examples.

Update the introduction to mention represents.

Update the examples.

Update the profiles and dispositions.

Define an inheritance model for `daptm:represents`.

Make Represents required to have a non-empty and valid computed value, but don't require `daptm:represents` on every Script Event `<div>` element.

Allow user-defined content-descriptor values beginning `x-`.

State that ttm:desc SHOULD NOT be empty.

* Temporary fix for speced/respec#4806

Move the term inside the angle brackets, which makes it harder to find in the index of terms, but fixes the Respec error.

* Fix SVG validation issue

* Address review comments

* Fix broken reference to scriptRepresents
* Explain presence of inherited `daptm:represents` on `<body>` element in example
* Explain how scriptRepresents might include values not present in Script - Represents
* Fix syntax references to NMToken and `<lwsp>`
* Take suggestions for better term definitions for content-descriptor
* Clarify that Represents is inheritable, within the Represents property aside.

* Allow `.` as delimiter, and fix user-defined descriptor text

* Fix some broken examples

* Address additional review comments

* Fix up ; to .

* Fix up more ; and .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant