]> matita.cs.unibo.it Git - helm.git/commitdiff
<h:Object> is now repeated every time a MainHypothesis (with its depth) is
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Thu, 21 Nov 2002 11:01:24 +0000 (11:01 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Thu, 21 Nov 2002 11:01:24 +0000 (11:01 +0000)
printed. The RDF file gets a bit bigger, but lexical analysing it becomes
much easier.

helm/metadata/create_V7_mowgli/METADATA/sthandler.c
helm/metadata/create_V7_mowgli/METADATA/sthandler_ind.c

index e26569fcdb5111367ffe8aa2135c0e39f4252b29..0f32e07c179c6a0cf25a86b66bd79e19eb10455d 100644 (file)
@@ -243,37 +243,37 @@ print_mainhyp(about,outrel,outsort,uri,l)
     curr = l;
     if (!strcmp(uri,"Rel"))
       {
-        fprintf(outrel,"\t<h:Object rdf:about=\"");
-        fprintf(outrel,"%s",about);
-        fprintf(outrel,"\">\n");
         /* scan the list */
         while (curr != NULL)
          {
+            fprintf(outrel,"\t<h:Object rdf:about=\"");
+            fprintf(outrel,"%s",about);
+            fprintf(outrel,"\">\n");
            fprintf(outrel,"\t\t<h:refRel rdf:parseType=\"Resource\">");
             fprintf(outrel,"\n\t\t\t\t<h:position rdf:resource=\"&hns;MainHypothesis\"/>");
             fprintf(outrel,"\n\t\t\t\t<h:depth>%d</h:depth>",curr->val);
             fprintf(outrel,"\n\t\t</h:refRel>\n");
+           fprintf(outrel,"\t</h:Object>\n");
             curr = curr->next;
          }
-       fprintf(outrel,"\t</h:Object>\n");
       }
    else if ((!strcmp(uri,"Prop")) || (!strcmp(uri,"Type")) ||
             (!strcmp(uri,"Set")))
       {
         /* scan the list */
-        fprintf(outsort,"\t<h:Object rdf:about=\"");
-        fprintf(outsort,"%s",about);
-        fprintf(outsort,"\">\n");
         while (curr != NULL)
          {
+            fprintf(outsort,"\t<h:Object rdf:about=\"");
+            fprintf(outsort,"%s",about);
+            fprintf(outsort,"\">\n");
            fprintf(outsort,"\t\t<h:refSort rdf:parseType=\"Resource\">");
             fprintf(outsort,"\n\t\t\t\t<h:position rdf:resource=\"&hns;MainHypothesis\"/>");
             fprintf(outsort,"\n\t\t\t\t<h:sort rdf:resource=\"&hns;%s\"/>",uri);
             fprintf(outsort,"\n\t\t\t\t<h:depth>%d</h:depth>",curr->val);
             fprintf(outsort,"\n\t\t</h:refSort>\n");
+           fprintf(outsort,"\t</h:Object>\n");
             curr = curr->next;
          }
-       fprintf(outsort,"\t</h:Object>\n");
       }
     else 
      {
index a6e3a04afbd5fa650b5db8530572e0d032c590cd..bfdc795d56e9f71717cb8088e57f78f3cfea6ef4 100644 (file)
@@ -245,37 +245,37 @@ print_mainhyp(about,out,outrel,outsort,uri,l)
     curr = l;
     if (!strcmp(uri,"Rel"))
       {
-        fprintf(outrel,"\t<h:Object rdf:about=\"");
-        fprintf(outrel,"%s",about);
-        fprintf(outrel,"\">\n");
         /* scan the list */
         while (curr != NULL)
          {
+            fprintf(outrel,"\t<h:Object rdf:about=\"");
+            fprintf(outrel,"%s",about);
+            fprintf(outrel,"\">\n");
            fprintf(outrel,"\t\t<h:refRel rdf:parseType=\"Resource\">");
             fprintf(outrel,"\n\t\t\t\t<h:position rdf:resource=\"&hns;MainHypothesis\"/>");
             fprintf(outrel,"\n\t\t\t\t<h:depth>%d</h:depth>",curr->val);
             fprintf(outrel,"\n\t\t</h:refRel>\n");
+           fprintf(outrel,"\t</h:Object>\n");
             curr = curr->next;
          }
-       fprintf(outrel,"\t</h:Object>\n");
       }
    else if ((!strcmp(uri,"Prop")) || (!strcmp(uri,"Type")) ||
             (!strcmp(uri,"Set")))
       {
         /* scan the list */
-        fprintf(outsort,"\t<h:Object rdf:about=\"");
-        fprintf(outsort,"%s",about);
-        fprintf(outsort,"\">\n");
         while (curr != NULL)
          {
+            fprintf(outsort,"\t<h:Object rdf:about=\"");
+            fprintf(outsort,"%s",about);
+            fprintf(outsort,"\">\n");
             fprintf(outsort,"\t\t<h:refSort rdf:parseType=\"Resource\">");
             fprintf(outsort,"\n\t\t\t\t<h:position rdf:resource=\"&hns;MainHypothesis\"/>");
             fprintf(outsort,"\n\t\t\t\t<h:sort rdf:resource=\"&hns;%s\"/>",uri);
             fprintf(outsort,"\n\t\t\t\t<h:depth>%d</h:depth>",curr->val);
             fprintf(outsort,"\n\t\t</h:refSort>\n");
+           fprintf(outsort,"\t</h:Object>\n");
             curr = curr->next;
          }
-       fprintf(outsort,"\t</h:Object>\n");
       }
     else 
      {