W3C home > Mailing lists > Public > semantic-web@w3.org > August 2008

SPARQL question: get distinct list of datatypes used for literals

From: Andreas Langegger <al@jku.at>
Date: Thu, 21 Aug 2008 17:18:40 +0200
Message-Id: <AEA38E4C-372F-4244-8010-22DA0862B2B5@jku.at>
To: Semantic Web <semantic-web@w3.org>, public-rdf-dawg-comments@w3.org

Hi there,

maybe sb can tell me if this is still possible: I'd like to fetch all  
datatype URIs used for object literals in a dataset. There is the  
dataset predicate which can be used in filter expressions to filter  
literals to a known datatype like xsd:string: FILTER(datatype(?val) =  

But can I bind the value to a variable somehow? With a filter it can't  
work (consider FILTER(datatype(?val) = ?dt) where ?val is bound to  
literal values and ?dt should give me the type). I could use property  
functions, but I'd like to stay with SPARQL specs. Maybe there is a  
way to do it I just can't see...


Web of Data Practitioners Days / Oct 22-23 / Vienna
Dipl.-Ing.(FH) Andreas Langegger
Institute for Applied Knowledge Processing
Johannes Kepler University Linz
A-4040 Linz, Altenberger Straße 69
Received on Thursday, 21 August 2008 15:21:27 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:45:08 UTC