Example with INPUT Pragma grab-all

The following example demonstrates usage of the input:grab-all pragma:


DEFINE input:grab-all "yes"
DEFINE input:grab-depth 1
DEFINE input:grab-limit 50
PREFIX foaf: <http://xmlns.com/foaf/0.1/>

SELECT DISTINCT ?friendsname ?friendshomepage
       ?foafsname ?foafshomepage
WHERE
  {
    {
      {
        {
          SELECT ?start ?friend
          WHERE
            {
              ?start foaf:knows ?friend .
            }
        }
        
OPTION ( transitive, t_distinct, t_max (5), t_in (?start), t_out (?friend) )
        FILTER ( ?start = <http://www.w3.org/People/Berners-Lee/card#i> )
      }
      OPTIONAL {?friend foaf:mbox_sha1sum ?mbox .
      ?friendsURI foaf:mbox_sha1sum ?mbox .
      ?friendsURI foaf:name ?friendsname .
      ?friendsURI foaf:homepage ?friendshomepage . }
    }
    OPTIONAL {
               ?friendsURI foaf:knows ?foaf .
               ?foaf foaf:name ?foafsname .
               ?foaf foaf:homepage ?foafshomepage .
             }
  } 

Sponger Usage Examples

Related