TREX-Q is an off-shoot of work done by James Clark on an XML validation language called TREX. For an abstract outlining our work on TREX-Q, click here. The full paper as published in the 2001 conference for Linguistic Databases at UPenn is here in pdf format.
I strongly suggest you start by becoming familiar with TREX proper by reading through the TREX tutorial.
After that, then you should read the TREX-Q tutorial that desribes the additional features added to TREX-Q from TREX proper.
Then you can try the language out for yourself by downloading the
sample implementation coded by extending
James Clark's code written in Java.