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

Is there a way to define a "custom" [[spec: xxx]] -- to an external spec other than the pre-defined ones? #63

Open
swcurran opened this issue Apr 6, 2024 · 7 comments
Labels
Study The result is a report of an investigation

Comments

@swcurran
Copy link
Contributor

swcurran commented Apr 6, 2024

I love that I can reference W3C and IETF specs using the [[spec:rfc123]] syntax, get a mouse over link and an appendix list of specs.

Is there a way that I can use a spec reference to a any URL I want -- specs that Spec-Up doesn't know about? For example, I want to reference the DIF "Linked Verifiable Presentation" spec. If I do [[spec:linked-vp]], I just see that literal in the rendered text. Is there a way to add my own URLs that I defined as "specs" so that they benefit from the spec: feature? Other examples -- ISO specs (although that might have to be to Wikipedia to avoid the paywall), W3C working documents, etc.

Thanks!

@swcurran
Copy link
Contributor Author

swcurran commented Apr 7, 2024

RTFM -- see documentation section on External Specs. Solved.

@swcurran swcurran closed this as completed Apr 7, 2024
@swcurran
Copy link
Contributor Author

swcurran commented Apr 8, 2024

And trying it out makes me realize that External Specs are not the same, even though the have such a promising name.

Is there a way to extend the known [[spec:xyz]] references?

@swcurran swcurran reopened this Apr 8, 2024
@csuwildcat
Copy link
Member

I'm sure I could figure something out. Why don't we take a look at IIW next week?

@csuwildcat
Copy link
Member

Is your main goal to enable one-offs to have the same format that the other refs have, or to create and draw from a new corpus of formatted refs? The former would be easier, but we could do the latter if we had a location to host the new ref catalog.

@swcurran
Copy link
Contributor Author

My main goal was to be able to add the needed specs to the JSON file, and then reference them in the various categories in the document — so the first one from your list. I didn’t realize until talking to @brianorwhatever that there was a standard list of reference-able specs. That feature is great, and it would be nice to have a link to that list. But ultimately, any list cannot include everything needed for a given spec, so I think having a way to add spec-specific references is necessary.

@swcurran swcurran changed the title Is there a way to define a "custom" spec -- to a spec other than a pre-defined one? Is there a way to define a "custom" [[spec: xxx]] -- to an external spec other than the pre-defined ones? Oct 16, 2024
@henkvancann henkvancann added the Study The result is a report of an investigation label Jan 14, 2025
@henkvancann
Copy link
Collaborator

[[spec]] is another tool and another concept than [[xref:]] and [[tref:]], they can both be used in the future.

[[spec]] refers to whole documents/specifications and offers a categorisation.

[[xref:]] and [[tref:]] are references to individual external definitions in related spec-up-(t)-based repos/specification

[[xref:]] is already present in DIF's Spec-Up, [[tref:]] will be added shortly.

@swcurran : Is there a way to define a "custom" [[spec: xxx]] -- to an external spec other than the pre-defined ones.

You could always use bare URLs, but then you miss the sophisticated characteristics of xref and tref, which are popups at hoovering, traceability, local backup, and diffs with git. That's because we need to define them in Specs.json.

@swcurran
Copy link
Contributor Author

@brianorwhatever has implemented the feature that I was looking for. AFAIK, it is not in the DIF version of SpecUp. I’m using it in did:wehvh — notable, In the specs.json file, we can add specs as defined below, and then reference them in a spec as [[spec:multiformats]] (for example), get the mouseover popup, the link and an entry in the list of specs produced by inserting [[spec]] into the markdown. Works great.

@brianorwhatever also shared with me that the default lists of specs are the W3C, IETF and WhatWG lists from the tobie/specref repo. See line 20 in this SpecUp file

      "external_specs": [
        {
          "multiformats": {
            "href": "https://datatracker.ietf.org/doc/draft-multiformats-multibase/08/",
            "title": "Multiformats",
            "rawDate": "2024-02-21",
            "authors": [
              "Juan Benet",
              "Manu Sporny"
            ],
            "status": "Internet Draft"
          }
        },
        {
          "di-eddsa-v1.0": {
            "href": "https://www.w3.org/TR/vc-di-eddsa",
            "title": "Data Integrity EdDSA Cryptosuites v1.0",
            "rawDate": "2024-12-08",
            "authors": [
              "Dave Longley",
              "Manu Sporny"
            ],
            "status": "W3C Technical Recommendation"
          }
        }
      ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Study The result is a report of an investigation
Projects
None yet
Development

No branches or pull requests

3 participants