示例#1
0
 function render_sparql_triples($triples)
 {
     if (!$triples) {
         return "";
     }
     $r = SMOBTools::render_sparql_triple($triples[0]);
     $i = 1;
     while ($i < count($triples)) {
         if (count($triples[$i]) == 1) {
             $r .= " ,\n";
         } else {
             if (count($triples[$i]) == 2) {
                 $r .= " ;\n";
             } else {
                 $r .= " .\n";
             }
         }
         $r .= SMOBTools::render_sparql_triple($triples[$i]);
         $i += 1;
     }
     $r .= " .";
     return $r;
 }