Skip to content

feat(yasqe): always include the SPARQL Anything vocabularies - #242

Merged
MathiasVDA merged 1 commit into
mainfrom
claude/project-thread-79v0mt
Oct 26, 2026
Merged

MathiasVDA merged 1 commit into
mainfrom
claude/project-thread-79v0mt

Conversation

@MathiasVDA

Copy link
Copy Markdown
Collaborator

Requested by Mathias · project thread

The three SPARQL Anything namespaces are now always available, as prefixes and as autocomplete vocabulary:

Prefix Namespace
xyz: http://sparql.xyz/facade-x/data/
fx: http://sparql.xyz/facade-x/ns/
fxe: http://sparql.xyz/facade-x/engine/ (the Façade-X Engine vocabulary, used by SPARQL Anything for SERVICE options: fxe:properties fxe:location "…")

Changes

  • fetchLovData.js: ALWAYS_INCLUDED gets the three namespaces. SPARQL Anything publishes no RDF files, so the terms are listed in a new terms field. They were taken from the SPARQL Anything docs and the Façade-X specs:
    • fx:: Root (class), anySlot, slot-key and the audit properties (properties), and the 44 functions (entity, literal, bnode, serial, cardinal, String.*, WordUtils.*, DigestUtils.*, the distances, URLEncoder.encode...).
    • fxe:: all the general, HTTP, S3 and format options (location, media-type, csv.headers, json.path, xml.path, html.selector...).
    • xyz: has no fixed terms, so it is only a prefix.
  • fetchPrefixData.js: adds the prefixes of ALWAYS_INCLUDED to the prefix.cc data, both when the fetch works and when it falls back to the committed file, so xyz/fx/fxe (and also railml, which was missing) survive npm run build. The committed prefixes.json gets fxe and railml. fx and xyz were already there.
  • Bundled terms: entries can now have an optional fifth list holding functions. lov-terms.json was updated in place from the existing bundle, keeping the generated date. The least used namespace (voag) drops out to stay within the size budget.
  • New function autocompleter: on Ctrl+Space, it suggests the bundled functions wherever an expression can start (BIND(, FILTER(, SELECT expressions). It matches on the prefixed name or on the local name (substr → fx:String.substring) and declares the missing PREFIX. Functions are not offered as properties.
  • Docs: docs/user-guide.md covers the always-present prefixes and has a SPARQL Anything section with an example. There is also a changeset (yasqe minor).

Tests

  • 5 new browser tests in test/run.ts (SPARQL Anything autocompletion). The full puppeteer suite passes: 73 tests.
  • Not verified: a refresh from live prefix.cc and LOV, which are unreachable from the cloud env. The merge path was exercised through the offline fallback.

Generated by Claude Code

Adds the SPARQL Anything namespaces xyz (http://sparql.xyz/facade-x/data/),
fx (http://sparql.xyz/facade-x/ns/) and fxe (http://sparql.xyz/facade-x/engine/)
to ALWAYS_INCLUDED. SPARQL Anything publishes no RDF files, so the fx magic
property, class and functions and the fxe options are listed there.

- fetchPrefixData.js adds the prefixes of ALWAYS_INCLUDED to the prefix.cc
  data, so xyz, fx, fxe (and railml) survive the refresh at build time.
- The bundled terms get an optional fifth list of functions, suggested by a
  new function autocompleter where an expression can start.
@MathiasVDA MathiasVDA self-assigned this Oct 25, 2026
@MathiasVDA
MathiasVDA merged commit 5a6ffac into main Oct 26, 2026
2 checks passed
@MathiasVDA
MathiasVDA deleted the claude/project-thread-79v0mt branch October 26, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant