PREFIX d3f: PREFIX dcterms: PREFIX owl: PREFIX rdf: PREFIX rdfs: PREFIX skos: PREFIX xsd: CONSTRUCT { ?s ?p ?new_o . } WHERE { ?s ?p ?o . # Transform rdfs:seeAlso strings that are valid QNames into URIs BIND( IF( ?p = rdfs:seeAlso && isLiteral(?o) && REGEX(STR(?o), "^d3f:([a-zA-Z_][a-zA-Z0-9_]*)$"), URI(REPLACE(STR(?o), "^d3f:", STR(d3f:))), ?o ) AS ?new_o ) FILTER (?p NOT IN ( d3f:d3fend-data-property, d3f:d3fend-kb-data-property, d3f:d3fend-kb-object-property, d3f:d3fend-object-property, d3f:todo ) ) FILTER ( !isLiteral(?new_o) || (isLiteral(?new_o) && STRLEN(STR(?new_o)) > 0) ) FILTER ( !(?p = rdfs:seeAlso && isLiteral(?new_o) && !REGEX(STR(?new_o), "^d3f:([a-zA-Z_][a-zA-Z0-9_]*)$")) ) }