Skip to content

Commit c4124b4

Browse files
namedgraphclaude
andcommitted
Align ac:property-label cache lookup with documentPool key shape
The pre-cached vocabulary documentPool keys entries under resolve-uri(ac:document-uri(<ns>), \$ac:contextUri) — ac:document-uri strips the trailing fragment so hash namespaces like &http; are stored under http://www.w3.org/2011/http (no #). The ac:property-label mode C branch was looking up documents via doc-available(namespace-uri()) / document(namespace-uri()), which still includes the # for hash vocabs, so the lookup missed and labels for http:*, rdf:*, rdfs:*, spin:* etc. fell through to the local-name() fallback. Slash-namespace vocabs (dct:, etc.) happened to work because there's no fragment to strip on either side. Server-side Saxon was unaffected because Java's URI resolver fetches over HTTP and the wire layer drops the fragment naturally. Wrap the lookup in ac:document-uri(namespace-uri()) so it matches the cache key. Also drops the temporary xsl:message debug lines added in #298. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 26d1d94 commit c4124b4

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

  • src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/imports

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/imports/default.xsl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -416,17 +416,12 @@ exclude-result-prefixes="#all"
416416
<xsl:apply-templates select="key('resources', $this)" mode="ac:label"/>
417417
</xsl:when>
418418
<xsl:when test="$property-metadata/key('resources', $this, .)">
419-
<xsl:message>ac:property-label mode B $this: <xsl:value-of select="$this"/></xsl:message>
420-
421419
<xsl:apply-templates select="$property-metadata/key('resources', $this, .)" mode="ac:label"/>
422420
</xsl:when>
423-
<xsl:when test="doc-available(namespace-uri()) and key('resources', $this, document(namespace-uri()))">
424-
<xsl:message>ac:property-label mode C $this: <xsl:value-of select="$this"/></xsl:message>
425-
<xsl:apply-templates select="key('resources', $this, document(namespace-uri()))" mode="ac:label"/>
421+
<xsl:when test="doc-available(ac:document-uri(namespace-uri())) and key('resources', $this, document(ac:document-uri(namespace-uri())))">
422+
<xsl:apply-templates select="key('resources', $this, document(ac:document-uri(namespace-uri())))" mode="ac:label"/>
426423
</xsl:when>
427424
<xsl:otherwise>
428-
<xsl:message>ac:property-label mode D $this: <xsl:value-of select="$this"/></xsl:message>
429-
430425
<xsl:sequence select="local-name()"/>
431426
</xsl:otherwise>
432427
</xsl:choose>

0 commit comments

Comments
 (0)