Skip to content

SPARQL support for XPath#25

Open
redhog wants to merge 1 commit intostaffanm:masterfrom
redhog:sparql
Open

SPARQL support for XPath#25
redhog wants to merge 1 commit intostaffanm:masterfrom
redhog:sparql

Conversation

@redhog
Copy link

@redhog redhog commented Aug 23, 2021

Closes #24

Current implementation

      <xsl:for-each select="ferenda:sparql('
         select ?subj
         where {
           ?subj [http://lagen.nu/vocab/parliament#approve] [http://rinfo.lagrummet.se/publ/sfs/2021:743] .
         }
     ')">
        <li>
          <xsl:value-of select="@subj"/>
        </li>
      </xsl:for-each>

Note the [] instead of <> to be a valid xml attribute value - the more proper, but unreadable alternative would have been &lt;&gt;...

The return value of ferenda:sparql would be a sequence of <ferenda:SparqlResult bindname=value ... bindname=value> elements.

Note that the type (uri or literal) for a value is not represented at all currently, as that would make the result nodes more complex and make the syntax more unwieldly...

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.

SPARQL access from XSLT / XPath

1 participant