A complicated procedure to run XML-QL

Sorry about this there is no chance to get a proper setup before the end of class. However this should work for you.
 

  • Have your xml and query files in one directory and cd there.

  • (it might be wise to have your query files with the extension .xmlql)
    1. enter this command to see your environment: setenv
    2. if JAVA is not in your path (you should see:  path ... /usr/local/java/jdk1.1/bin ...  (where ... is other stuff) do: set path=(/usr/local/java/jdk1.1/bin /serel/faculty/riggs/XML-QL/xmlql.v0_9 $path)
    3. check each of the following and if the variable (in CAPS) is missing in the environment, do the command
      1. setenv CLASSPATH /usr/local/java/jdk1.1/lib/classes.zip
      2. setenv XMLQLDIR /serel/faculty/riggs/XML-QL/xmlql.v0_9
      3. setenv STRUDELTMP /serel/faculty/riggs/XML-QL/strudl_tmp
      4. setenv XMLQLLIB /serel/faculty/riggs/XML-QL/xmlql.v0_9/lib
  • now run your xml query (change  QRYNAME and QRYRSLT to the file with your query and the file for your output)

  • $XMLQLDIR/bin/xmlql.sh -idir . -q QRYNAME -o QRYRSLT
     
  • an example query would is

  • // Description: Produce all authors published by Addison-Wesley
    // Feature: Select & project on element values
    //
    function query() {
      CONSTRUCT
      <result> {
        WHERE <bib.book>
                <publisher><name>"Addison-Wesley"</></>
                <title>$t</>
                <author>$a</>
              </> IN "bib.xml"
        CONSTRUCT $a
      } </result>
    }