[Ex-plain] ZeeRex and CQL

Mike Taylor mike at indexdata.com
Tue Mar 2 02:55:22 CET 2004


> Date: Mon, 23 Feb 2004 19:37:15 +1100
> From: Alan Kent <ajk at mds.rmit.edu.au>
> 
> In CQL you have the "dc" set which defines all the Dublin Core index
> names that can be used.

Well, sort of.  There is nothing special about the Dublin Core set in
the CQL: it's just one more context set, along with Bath, CCR, Zthes
and the rest.  (It just happens that it's one that'll get used a lot.)
And of course there's even less special about the prefix "dc": as
Ralph has pointed out many times, the "dc" prefix could legitimately
be used for the Deep Custard context set.

> Then there is the CQL context set that defines '=', '<', exact, any,
> all, stem, etc.  These are the sorts of relations and modifiers that
> you don't have to specify a prefix for in a normal CQL query.

Yes.  This context set, and _only_ this one, _is_ special to CQL, in
that unprefixed relations and modifiers are always taken from the CQL
set rather than the prevailing default context set that's used for
index-names.

> I am assuming you should not be able to use dc.title as a relation
> modifier for example, so the CQL parser has to know what type of
> entry 'title' is in a context set.

Well, Dublin Core title can't be a relation modifier, no.  But the
Deep Custard set may well include a relation modifier called
"title" for all we know.

> Further, in implementing my personal CQL parser (ie: possibly not
> a standardisation issue), I want to know how to do left truncation
> and right truncation.

Like this:
	kern*
and this:
	*ighan

That is the only way to express these concepts in standard CQL (though
I suppose there's nothing stopping you from inventing a context set
that has relation modifiers to be used on the "=" relation, as in
	dc.creator =/alan.rightTruncation kern

But the polite way to recognise right-truncation in CQL is just to
spot the use of a pattern in which the last character is "*" and all
the others are literals.

 _/|_	 _______________________________________________________________
/o ) \/  Mike Taylor  <mike at indexdata.com>  http://www.miketaylor.org.uk
)_v__/\  "... currently trading under the name Gently for reasons
	 which it would be otiose, for the moment, to rehearse" --
	 Douglas Adams, "Dirk Gently"

--
Listen to my wife's new CD of kids' music, _Child's Play_, at
	http://www.pipedreaming.org.uk/childsplay/






More information about the Ex-plain mailing list