Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPARQL support for XPath #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

SPARQL support for XPath #25

wants to merge 1 commit into from

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