2015-08-26 26 views
0

我想刪除使用此查詢一些三倍,但它給了我下面的錯誤刪除查詢與SPARQL

此行是無效的

我不明白我在做什麼錯。誰能幫我?

DELETE DATA{ 
GRAPH <http://vitali.web.cs.unibo.it/raschietto/graph/ltw1536> 
      { [ a oa:Annotation; 
        rdfs:label "Author"^^<http://www.w3.org/2001/XMLSchema#string> ; 
        vurp:type "hasAuthor"^^<http://www.w3.org/2001/XMLSchema#normalizedString> ; 
        oa:AnnotatedAt "2015-8-26T10:1:25"^^<http://www.w3.org/2001/XMLSchema#dateTime>; 
        oa:AnnotatedBy <ccc>; 

       oa:hasBody [ a rdf:Statement; 
        rdf:object [ a <http://xmlns.com/foaf/0.1/Person> ; 
        rdf:subject <http://vitali.web.cs.unibo.it/raschietto/person/s-undefinedstocazzo> ; 
        rdfs:label "stocazzo"^^<http://www.w3.org/2001/XMLSchema#string>     
        ]; 

      rdf:predicate <http://purl.org/dc/terms/creator> ;  
      rdf:subject <http://www.dlib.org/dlib/november14/knoth/11knoth.html> ; 
      rdfs:label "An author of the document is stocazzo"^^<http://www.w3.org/2001/XMLSchema#string> 

      ] ; 
       oa:hasTarget [ a oa:SpecificResource; 
              oa:hasSelector [a oa:FragmentSelector; 
                  rdf:value "form1_table3_tbody1_tr1_td1_table5_tbody1_tr1_td1_table1_tbody1_tr1_td2_p4"^^<http://www.w3.org/2001/XMLSchema#normalizedString>; 
                  oa:end "91"^^<xsd:nonNegativeInteger>; 
                  oa:start "77"^^<xsd:nonNegativeInteger> 
                  ]; 
                oa:hasSource <http://www.dlib.org/dlib/november14/knoth/11knoth.html>; 
                 ] 
      ]. 
             } 
       } 
+1

**「這一行是無效的」**這並不是說對*,其中*行任何你創建這個查詢嗎?代碼?你是否包含換行符?如果你這樣做,那麼你的查詢將會是多個行,你可能會得到一個行號。如果你不這樣做,那麼這只是一條線。在字符串連接中犯錯誤也很容易,例如''select?x「+」where {「'成爲'select?xwhere {'這將是一個問題。 –

回答

3

我不知道具體是什麼錯誤你得到它,但如果您貼上您查詢到validator at sparql.org,至少還有一個問題,那肯定是顯著,而且可能是您的問題:

10行,第15列:空白節點不允許DELETE模板

+0

它在行「{[a oa:Annotation;」並且如果我改變它繼續給我這樣的錯誤:在第25行第17列遇到「」\「Comment \」「」)給我一個錯誤。 期待之一: 「}」... 「;」 ... 「,」... 「。」 ... – pbex

+2

@ user3468308是;根據驗證程序,在DELETE更新中不允許使用空節點,並且'['是空節點的開始。在沒有看到構建查詢的實際Java代碼的情況下,行號和其他引用的內容(如第25行第17列的「Encountered」「Comment」「」)對我們來說並不意味着什麼。 –