@prefix this: . @prefix sub: . @prefix np: . @prefix grlc: . @prefix dct: . @prefix nt: . @prefix npx: . @prefix xsd: . @prefix rdfs: . @prefix prov: . sub:Head { this: a np:Nanopublication; np:hasAssertion sub:assertion; np:hasProvenance sub:provenance; np:hasPublicationInfo sub:pubinfo . } sub:assertion { sub:get-docs-paragraph-related a grlc:grlc-query; dct:description "Paragraphs linked to one documentation paragraph with rdfs:seeAlso, in either direction, by a member of the maintaining space. Returns the related paragraph (as the paragraph column, so a paragraph view links its heading to that paragraph's page), its current title, and its chapter as declared for this documentation; the linking nanopublication is the row's source and edit target."; dct:license ; rdfs:label "Get the paragraphs related to a documentation paragraph"; grlc:endpoint ; grlc:sparql """prefix rdf: prefix rdfs: prefix dct: prefix np: prefix npa: prefix npx: prefix schema: prefix schemas: prefix gen: # Paragraphs related to ONE documentation paragraph, in either direction of rdfs:seeAlso, # where the link was published by a member of the maintaining space. ?paragraph is the # related paragraph (so the heading links to its page), ?title its current title, ?content # names its chapter, ?np is the linking nanopublication (also the edit target). select ?paragraph ?title ?content ?date (str(?np) as ?override_target) ?np (\"^\" as ?np_label) where { { select ?paragraph ?np ?date (min(?t) as ?title) (min(?topicLabel) as ?chapterLabel) (min(str(?topic)) as ?chapter) where { service { select (group_concat(?mpk; separator=\" \") as ?memberPubkeys) where { graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . } values ?__context_multi_iri {} graph ?stateG { ?__context_multi_iri npa:isMaintainedBy? ?space . ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; npa:forAgent ?agent ; npa:hasRoleType ?roleType . ?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?mpk . } filter(?roleType in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole)) } } values ?_resource_multi_iri {} graph npa:graph { ?np npa:hasValidSignatureForPublicKeyHash ?k ; dct:created ?date ; np:hasAssertion ?la . filter not exists { ?x npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?k . } } filter(contains(?memberPubkeys, ?k)) graph ?la { { ?_resource_multi_iri rdfs:seeAlso ?paragraph . } union { ?paragraph rdfs:seeAlso ?_resource_multi_iri . } } filter(?paragraph != ?_resource_multi_iri) # the related paragraph's current (newest member-signed) title and chapter graph npa:graph { ?pnp npa:hasValidSignatureForPublicKeyHash ?pk ; dct:created ?pdate ; np:hasAssertion ?pa . filter not exists { ?y npx:invalidates ?pnp ; npa:hasValidSignatureForPublicKeyHash ?pk . } } filter(contains(?memberPubkeys, ?pk)) graph ?pa { ?paragraph rdf:type gen:Paragraph ; schema:title|schemas:title ?t ; schema:about|schemas:about|schema:isPartOf|schemas:isPartOf ?topic . } filter not exists { graph npa:graph { ?pnp2 npa:hasValidSignatureForPublicKeyHash ?pk2 ; dct:created ?pdate2 ; np:hasAssertion ?pa2 . filter not exists { ?z npx:invalidates ?pnp2 ; npa:hasValidSignatureForPublicKeyHash ?pk2 . } } graph ?pa2 { ?paragraph rdf:type gen:Paragraph . } filter(?pdate2 > ?pdate) filter(contains(?memberPubkeys, ?pk2)) } # the chapter's title as declared for THIS documentation, not any label the anchor IRI has elsewhere values ?__context_multi_iri {} optional { graph ?tg { ?topic rdfs:label ?topicLabel ; gen:isRelevantFor ?__context_multi_iri . } } } group by ?paragraph ?np ?date } bind(concat(\"

In chapter \", coalesce(?chapterLabel, ?chapter), \"

\") as ?content) } order by ?title""" . } sub:provenance { sub:assertion prov:wasAttributedTo . } sub:pubinfo { this: dct:created "2026-09-15T07:56:31Z"^^xsd:dateTime; dct:creator ; dct:license ; npx:embeds sub:get-docs-paragraph-related; npx:supersedes ; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAl8cMusqtNyKA6UIsi3f7BAcZmHQXWxU0qk0PLsboMWQxYrGBfGgHTgRHJrBRxL+Zn9kJHKVmz2smDcjCBptXi/OwWy80gjsx+Pbe6IWz3zFPWF1UoFIKfPnC0slV67CQgdM853zW7Bmk9/uflCtK4EtZKmPdRGtUHVC7DTVvDBMDzLRGdE2KCBVN29EbM5GGVNvijYbaZQ9OFQPBkQshayqSIyGRr6rreJdkrRVLIzu3uuAjKYydaeXZWSN2JLnVBwrClKUxaEdCwhb5nXpMtKOMD+R+LgaXLeJUWM8BdRSYnta9ZqI5pHY4y3v+eW7J+HHeTvRbHvlik+Z4hFUXmQIDAQAB"; npx:hasSignature "VrSQ1FneQ7FUpiKU9FL/LhiufrTEpPwKwhmrzChzbci1H6jamUTn/fRTP6RSqCBcnrRddp3Gdo7gwdP47mWIef72q+m6YAoouVA+CfdcQatqfFqHPxXxw5yhhhi+c8WNqsaoaDr6MoyAlOKFlS8BpQ/eiK4VsH7+6vEPwSLSVcu2aDhN1TJ00/VxXlDeX93ad8xyYBfRJ1bgnJcz31r2OKR7BLtq+sv78xGLap1MKr0aPhUw/5qUVvoW/A/RuTBqpqmXmkfrnpDUQdOFTIAKKr/OTYpNaTMeq6Di1h2nJ3UWFVM8/FUIGpWOBkNZ7VkQ1Oa1j48MjJYjqQWjPj1dww=="; npx:hasSignatureTarget this:; npx:signedBy . }