BIND in ruleset not working properly

I have the following data:

inst:IfcBuildingStorey_132
        rdf:type  ifcowl:IfcBuildingStorey .
inst:IfcBuildingStorey_132
        ifcowl:name_IfcRoot  inst:IfcLabel_41979 ;

inst:IfcLabel_41979  rdf:type  ifcowl:IfcLabel ;
        express:hasString  "Level 3" .

And this is my rule:

[] a rule:SPARQLRule ;
    rule:content """
            IF {
            ?storey a ifcowl:IfcBuildingStorey ;
                ifcowl:name_IfcRoot/express:hasString ?string .
            ?storey ccs:classCode "E" .
            ?storey ccs:topNode "[S]" .
            ?storey ccs:className "Etage"@da . 

            BIND (substr(?string, strlen(?string)) AS ?levelno) . 
            BIND (CONCAT("E", ".", ?levelno) AS ?storeyID)
                    
            }
            THEN {
            ?storey ccs:singleLevelID ?storeyID .
            }""".

The objective is to get results that looks like this:

SELECT ?storey ?id 
WHERE {
?storey a ifcowl:IfcBuildingStorey . 
?storey ccs:singleLevelID ?id . 
}

?storey
inst:inst:IfcBuildingStorey_132

?id
E3

But when I run this it does not work :confused: I get no results. However I have tried to run a the above in a similar SPARQL query and there I get results. Any suggestions?

Maybe you just missed copy and pasting it but you don’t have anything for ccs:classCode, ccs:topNode or ccs:className in your data.

Of course! Sorry my bad. That is the problem. Thanks Zachary.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.