私は2つのwhere
節を持っています。このクエリの論理エラーですか?
PREFIX tourister: <PREFIX_VALUE>
SELECT ?a
WHERE {
{?a tourister:hasRating ?b .
?b ?c '5'@string } .
{?a tourister:hasFeature ?b .
?b ?c 'Pool'@string }
}
自分の上で実行されたとき彼らは、正常に動作、またはそれらの間のUNION
句がある場合は、しかし、私は交差点を探しています。私がオンラインで読んだことから、「.
」を交差点として使用できることが判明しました。しかし、.
では、結果は0です。いいえ、構文エラー、ロジックに問題があります。
また、上記クエリのPREFIX_VALUE
はエラーではありませんので、意図的に省略しています。
<!-- http://tourister.space/ontologies/tourism#TESTInd -->
<owl:NamedIndividual rdf:about="http://tourister.space/ontologies/tourism#TESTInd">
<rdf:type rdf:resource="http://tourister.space/ontologies/tourism#Hotel"/>
<hasFeature rdf:resource="http://tourister.space/ontologies/tourism#TESTIndFeature"/>
<hasRating rdf:resource="http://tourister.space/ontologies/tourism#TESTIndRating"/>
</owl:NamedIndividual>
<!-- http://tourister.space/ontologies/tourism#TESTIndFeature -->
<owl:NamedIndividual rdf:about="http://tourister.space/ontologies/tourism#TESTIndFeature">
<rdf:type rdf:resource="http://tourister.space/ontologies/tourism#Feature"/>
<hasName xml:lang="string">Pool</hasName>
</owl:NamedIndividual>
<!-- http://tourister.space/ontologies/tourism#TESTIndRating -->
<owl:NamedIndividual rdf:about="http://tourister.space/ontologies/tourism#TESTIndRating">
<rdf:type rdf:resource="http://tourister.space/ontologies/tourism#Rating"/>
<hasStarRating xml:lang="string">5</hasStarRating>
</owl:NamedIndividual>
詳細が必要です。詳細については、http://stackoverflow.com/help/mcveを参照してください。 – AndyS
より簡単なクエリを使用して内括弧を削除できないのはなぜですか?また、 'string 'ではなく、言語の値に適切な言語タグを使用するようにお勧めします。 – AKSW
RDFも間違っています。 'xml:lang ="文字列 "' ??私はRDF/XMLを手書きではないことをお勧めします。人間が読めるものではありません。 – scotthenninger