Actually using sparql for the first time, it’s clear that I have not used rdfs:label and rdfs:comment properly.
I have put informative text in rdfs:label. That’s not what it’s for. rdfs:label is for putting column labels on your data, essentially, and I think should be a slightly more human-readable version of the #nameOfTheTerm . So I’m moving stuff that’s currently in rdfs:label to rdfs:comment.
I’m also adding rdfs:isDefinedBy to everything, just to round things out. It’s not really necessary with linked data: to get “all terms defined as part of the AFD vocabulary”, you just get the AFD vocabulary document with an http fetch. But it begins to make sense when the vocabulary is just nodes in a triple store.
Very easy to do, btw. You define your xml:base property to be the URI of the vocabulary. All rdf:resource and rdf:about elements become "#foo", except for the ontology itself which is simply "". So the defined by is simply <refs:isDefinedBy rdf:resource=""/> .