Hi Manuel, I have tested the query you provided against empty default Virtuoso 6.1.3 and 6.1.2 databases, and do get results returned:
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . owl:Thing rdfs:label "Thing" . owl:Class rdfs:label "Class" . owl:Nothing rdfs:label "Nothing" . owl:complementOf rdfs:label "complementOf" . owl:unionOf rdfs:label "unionOf" . owl:Ontology rdfs:label "Ontology" . owl:imports rdfs:label "imports" . owl:versionInfo rdfs:label "versionInfo" . owl:priorVersion rdfs:label "priorVersion" . owl:OntologyProperty rdfs:label "OntologyProperty" . owl:AnnotationProperty rdfs:label "AnnotationProperty" . owl:equivalentClass rdfs:label "equivalentClass" . owl:disjointWith rdfs:label "disjointWith" . owl:equivalentProperty rdfs:label "equivalentProperty" . owl:differentFrom rdfs:label "differentFrom" . owl:distinctMembers rdfs:label "distinctMembers" . owl:AllDifferent rdfs:label "AllDifferent" . owl:intersectionOf rdfs:label "intersectionOf" . owl:oneOf rdfs:label "oneOf" . owl:Restriction rdfs:label "Restriction" . owl:onProperty rdfs:label "onProperty" . owl:allValuesFrom rdfs:label "allValuesFrom" . owl:hasValue rdfs:label "hasValue" . owl:someValuesFrom rdfs:label "someValuesFrom" . owl:minCardinality rdfs:label "minCardinality" . owl:maxCardinality rdfs:label "maxCardinality" . owl:cardinality rdfs:label "cardinality" . owl:ObjectProperty rdfs:label "ObjectProperty" . owl:DatatypeProperty rdfs:label "DatatypeProperty" . owl:inverseOf rdfs:label "inverseOf" . owl:TransitiveProperty rdfs:label "TransitiveProperty" . owl:SymmetricProperty rdfs:label "SymmetricProperty" . owl:FunctionalProperty rdfs:label "FunctionalProperty" . owl:InverseFunctionalProperty rdfs:label "InverseFunctionalProperty" . owl:backwardCompatibleWith rdfs:label "backwardCompatibleWith" . owl:incompatibleWith rdfs:label "incompatibleWith" . owl:DeprecatedClass rdfs:label "DeprecatedClass" . owl:DeprecatedProperty rdfs:label "DeprecatedProperty" . owl:DataRange rdfs:label "DataRange" . owl:sameAs rdfs:label "sameAs” Can you please confirm the Virtuoso version and build data of the binary being used by running the command: $ virtuoso-t -? Virtuoso Open Source Edition (multi threaded) Version 6.1.3.3127-pthreads as of May 29 2011 Compiled for Darwin (i386-apple-darwin10.6.0) Copyright (C) 1998-2011 OpenLink Software Best Regards Hugh Williams Professional Services OpenLink Software Web: http://www.openlinksw.com Support: http://support.openlinksw.com Forums: http://boards.openlinksw.com/support Twitter: http://twitter.com/OpenLink On 14 Jul 2011, at 19:00, manuelso wrote: > Hi, > > I am running OpenLink Virtuoso version 06.01.3127, on Linux (x86_64). > > My question is the following. I have a SPARQL construct query with complex > optionals that returns no results. It looks like ... > > CONSTRUCT { ?s <http://www.w3.org/2000/01/rdf-schema#label> ?o } > WHERE { > ?s <http://www.w3.org/2000/01/rdf-schema#label> ?o . > OPTIONAL { ?s <http://www.w3.org/2000/01/rdf-schema#NOT_EXISTING> > <http://www.w3.org/2000/01/rdf-schema#NOT_EXISTING> . } > } > > I know that the pattern in the OPTIONAL clause is not satisfied but, despite > that fact, I should get results. I have tested this query also with Jena-TDB > and 4store and in both cases I get results. Also in the SPARQL spec I could > read ... > > "If any such instantiation produces a triple containing an unbound variable > or an illegal RDF construct, such as a literal in subject or predicate > position, then that triple is not included in the output RDF graph." (see > also > http://answers.semanticweb.com/questions/2529/sparql-construct-queries-against-optional-data) > > So my question is ... whether this is a bug and, if so, if it has been fixed > in latest releases ? > > Thanks, > > Manuel Salvadores > > > ------------------------------------------------------------------------------ > AppSumo Presents a FREE Video for the SourceForge Community by Eric > Ries, the creator of the Lean Startup Methodology on "Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev_______________________________________________ > Virtuoso-users mailing list > Virtuoso-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/virtuoso-users