title: SPARQL selecting unittext (blank nodes)
body: <p>I recently started working with Linked Data and SPARQL.
  I've a dataset which contains unittext, indicating what kind of unit the property has (meters, kilograms and so on).
  The unit is a values which is inserted on the relationship between object and its quantitative property.
  In my RDF dataset the units are included in a blank node and indicated by <a href="https://schema.org/unitText" rel="nofollow noreferrer">https://schema.org/unitText</a>.</p>
  <p>An example of the data set is included below.</p>
  <pre><code>], [
  a owl:Restriction ;
  owl:minCardinality &quot;0&quot;^^xsd:nonNegativeInteger ;
  owl:onProperty &lt;https://someuri&gt; ;
  ns1:unitText &quot;kg&quot;
  </code></pre>
  <p>How can I select this property?</p>
  <p>The query so far is:</p>
  <pre><code>PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
  PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
  PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt;
  PREFIX skos: &lt;http://www.w3.org/2004/02/skos/core#&gt;
  PREFIX sh: &lt;http://www.w3.org/ns/shacl#&gt;
  PREFIX xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt;
  select distinct ?label ?aspect ?datatype where {
  ?s rdfs:subClassOf/owl:onProperty ?aspect . 
  ?aspect rdf:type owl:ObjectProperty.
  ?aspect skos:prefLabel ?label .
  ?aspect rdfs:range ?datatype .
  
  FILTER  EXISTS{ ?aspect rdfs:range ?datatype. }
  
  VALUES ?datatype {
  xsd:string
  xsd:gYear
  xsd:boolean
  xsd:decimal
  xsd:integer
  xsd:date
  }
  
  
  }
  </code></pre>
  <p>The RDF dataset looks actually like this:</p>
  <pre><code>rdfs:subClassOf  [ a  owl:Restriction ; 
                        owl:minCardinality &quot;0&quot;^^xsd:nonNegativeInteger ;
                        owl:onProperty                 &lt;someuri&gt; ;
                        &lt;https://schema.org/unitText&gt;  &quot;kg&quot;
                   ] ;
  </code></pre>