Repository navigation
Vendor the RDFa editor's resources key that skips XML literals - #436
Merged
Merged
Conversation
rdfa-editor/translations.xsl declares the resources key too, and key declarations of one name are merged across the stylesheet. Left without #435's exclusion it still indexed the descriptions inside an XML literal, so a document whose assistant turn returned a graph describing the document itself still failed in the browser: the page title's ac:label(key('resources', $resource-uri, $results)) (client.xsl) got two descriptions. Located in the composed client SEF, where it was the only one of seven resources-family keys without the predicate. Byte-identical to AtomGraph/RDFa-Editor#35. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
After #435,
https://northwind-traders.demo.localhost/assistant-repro-1648/(a document whose assistant turn returned a CONSTRUCT graph describing the document itself) still failed in the browser:Caught through the DevTools protocol, the error is at
ldh-composed-client.xslline 285, the page-title lookup inclient.xsl:ac:label(key('resources', $resource-uri, $results)).Key declarations with the same name are merged across the stylesheet. The composed client SEF contains seven
resources-family keys, and six of them carry #435's exclusion. The seventh isrdfa-editor/translations.xsl, which #435 left alone because the vendored editor is kept byte-identical to its repository. That one still indexed the description inside the XML literal.What
rdfa-editor/translations.xslnow matches AtomGraph/RDFa-Editor#35 byte for byte. That PR adds the samenot(ancestor::*[@rdf:parseType = 'Literal'])predicate to the key, plus a comment explaining it.Testing
make sef, then a rebuilt image and stack, then a fresh browser, since the composed SEF's URL is unchanged and/static/is cachedimmutable.🤖 Generated with Claude Code