Skip to content

Commit

Permalink
Use Spec-Up XRefs
Browse files Browse the repository at this point in the history
Signed-off-by: Rieks <[email protected]>
  • Loading branch information
RieksJ committed Apr 25, 2024
1 parent e759bc9 commit bbcf0dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
mrg-import -c tev2-config.yaml
mrgt -c tev2-config.yaml
hrgt -f -c tev2-config.yaml
trrt -f -c tev2-config-specup.yaml
trrt -f -c tev2-config.yaml
trrt -f -c tev2-config-specup.yaml
# Commit generated MRGs to repo, so other projects can use (import) them
- name: Commit MRGs to repository
Expand Down
12 changes: 6 additions & 6 deletions docs/how-to/use-spec-up-term-references.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Using Spec-Up Term References

# Spec-Up Term References Integration

[TEv2](@tev2) allows customization of the syntax that authors use for [TermRefs](@tev2). In this page, we show what it takes to use the syntax as [defined by Spec-Up](https://identity.foundation/spec-up/), which is a tool that aims to facilitate the writing of technical specifications aimed at standards bodies or industry groups.
[[xref: tev2, TEv2]] allows customization of the syntax that authors use for [[xref: tev2, TermRefs]]. In this page, we show what it takes to use the syntax as [defined by Spec-Up](https://identity.foundation/spec-up/), which is a tool that aims to facilitate the writing of technical specifications aimed at standards bodies or industry groups.

## Background: Spec-Up Syntax for Term References

Expand All @@ -18,12 +18,12 @@ In this [MVE](@), we only support the Spec-Up syntax for [[ref: term references]

- we do not use [[ref: Spec-Up definitions]] or [definition lists](https://github.com/decentralized-identity/spec-up/blob/master/single-file-test/spec.md#definition-lists)).
- we use [TEv2 machine readable glossaries](mrg@tev2) to find the definitions of terms that are being referred to.
- [[ref: Spec-Up term references]] are resolved using the default [terminology](@tev2) of the [current scope](@tev2).
- [[ref: Spec-Up XRefs]] are resolved in a similar fashion, using the `{title}` part as a [scopetag](@tev2).
- [[ref: Spec-Up term references]] are resolved using the default [[xref: tev2, terminology]] of the [[xref: tev2, current scope]].
- [[ref: Spec-Up XRefs]] are resolved in a similar fashion, using the `{title}` part as a [[xref: tev2, scopetag]].

## The TRRT Interpreter for Spec-Up Term References

In order to use Spec-Up [[ref: term references]] and [[ref: XRefs]], we need to write a [TEv2 interpreter](interpreter@tev2) that recognizes them. This can be done by mapping the `{term}` and `{title}` fields of the Spec-Up references to the [named capturing groups](@tev2) specified in the [interpreter profile of the TRRT](trrt#interpreter-profile@tev2), as follows:
In order to use Spec-Up [[ref: term references]] and [[ref: XRefs]], we need to write a [TEv2 interpreter](interpreter@tev2) that recognizes them. This can be done by mapping the `{term}` and `{title}` fields of the Spec-Up references to the [[xref: tev2, named capturing groups]] specified in the [interpreter profile of the TRRT](trrt#interpreter-profile@tev2), as follows:

| Spec-Up syntax | TEv2 equivalent | Comments |
| -------------- | --------------- | -------- |
Expand All @@ -48,11 +48,11 @@ trrt:
- "**/*.md"
```
If a [[ref: Spec-Up term reference]] or a [[ref: Spec-Up XRef]] are to be rendered in a different way, that means that the [TRRT](@tev2) must be called using another, appropriate [converter](@tev2) (either a [predefined one](trrt#predefined-converters@tev2), or a [customized one](trrt#converter-customization@tev2)).
If a [[ref: Spec-Up term reference]] or a [[ref: Spec-Up XRef]] are to be rendered in a different way, that means that the [[xref: tev2, TRRT]] must be called using another, appropriate [[xref: tev2, converter]] (either a [predefined one](trrt#predefined-converters@tev2), or a [customized one](trrt#converter-customization@tev2)).
The following text (below the horizontal line) is a literal quote from the Spec-Up single-file-test spec.md file, showing that [[ref: Spec Up definitions]] are untouched, whereas [[ref: Spec-Up term references]] are converted as we would expect them to.
Note that the [[ref: term references]] for `Term 1`, `Term 2` and `Term 3` will actually work. That is NOT because the [[ref: definitions]] are processed, but because they are defined as [curated texts](@tev2), and therefor they end up in the [TEv2 MRG](mrg@tev2) that is used to dereference them.
Note that the [[ref: term references]] for `Term 1`, `Term 2` and `Term 3` will actually work. That is NOT because the [[ref: definitions]] are processed, but because they are defined as [[xref: tev2, curated texts]], and therefore they end up in the [TEv2 MRG](mrg@tev2) that is used to dereference them.

-----

Expand Down

0 comments on commit bbcf0dd

Please sign in to comment.