I create the book shop ontology and I need to infer a new triple with an SWRL rule.


if (order hasShipment 1day) and( order contain book) then order has shipmentPrice=230.

I created a SWRL rule with this syntax below:

@prefix pre: <http://www.semanticweb.org/ontologies/bookShop.owl#>.
@prefix ns: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
@include <RDFS>. 
[rule: (?s pre:hasShipment ?o) (?s pre:contain ?b) (?b ns:type pre:Books) -> (?s pre:shipmentPrice 230)]

My SPARQL result does not reflect the triple (?s pre:shipmentPrice 230).

asked 26 Jan '13, 11:08

Ton%20Rawat's gravatar image

Ton Rawat
accept rate: 50%

edited 28 Jan '13, 17:26

Signified's gravatar image

Signified ♦


@Ton, welcome to answers.semanticweb.com! Please have a look at the following:


As it stands, your question is missing some important details (a minimal example). What is your input data? What is your query? What tools are you using to execute the SWRL and SPARQL queries? How are they configured?

(28 Jan '13, 17:25) Signified ♦ Signified's gravatar image
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 26 Jan '13, 11:08

question was seen: 843 times

last updated: 28 Jan '13, 17:26