Derive server-side acl:mode() from Link response headers#299
Merged
Conversation
…pHeaders Java pushes outgoing response headers to XSLT as a $ldh:httpHeaders XdmMap (map(xs:string, xs:string*)) and the server-side acl:mode() parses Link entries with rel=acl#mode out of it, replacing the pre-aggregated $acl:mode param push. Drops the now-dead $acl:mode XSLT param default (and its ldh:listSuperClasses supertype-closure helper), the empty layout.xsl declaration, and converts the lone direct $acl:mode reference in admin/layout.xsl to acl:mode(). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
acl:mode() from Link response headers
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.
Summary
$ldh:httpHeadersmap (map(xs:string, xs:string*)).acl:mode()is rewritten to parse Link entries withrel=acl#modeout of that map, replacing the pre-aggregated$acl:modeparam push.ldh:listSuperClasses,ldh:ontologyImports) and the empty$acl:modedeclaration inlayout.xsl; converts the lone direct$acl:modereference inadmin/layout.xsltoacl:mode().Changes
XSLTWriterBase— populates$ldh:httpHeadersfrom outgoing response headers (LDH.httpHeadersvocabulary term added).imports/default.xsl—acl:mode()parses Link entries viaxsl:analyze-string; removesldh:listSuperClassesandldh:ontologyImports(unused).layout.xsl— removes the$acl:modeparam and the commented-out ontology-imports block in the JS docs config.admin/layout.xsl,document.xsl— switch toacl:mode()function call.Notes
\b; the Link header is split withxsl:analyze-string(regex<[^>]+>[^<]*) and therelmatch uses[;\s]relfor word boundary.acl:moderegex fix described above — fold it into the second commit (or add as a follow-up) before opening the PR.Test plan
mvn clean installdocker-compose up --build— container starts, no XSLT transformation errors in logs on first page loadacl:modevalues (e.g. owner sees Read/Write, anonymous sees Read only) and the rendered UI reflects themcd http-tests && ./run.sh ssl/owner/cert.pem … ssl/secretary/cert.pem …passes$acl:modeparam orldh:listSuperClasses/ldh:ontologyImportsin the codebase