<?xml version="1.0" encoding="utf-8"?>

<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<!-- Configuration file for the crossQuery full-text query servlet          -->
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<crossQuery-config>

    <!-- =====================================================================
         Tag:     <logging level="xxx"/>
         
         Descrip: Controls how much detail to output. xxx can be one of:
                     silent:   No logging
                     errors:   Log servlet restarts and errors
                     warnings: Log restarts, errors, and warnings
                     info:     Normal. Log all above, plus routine info msgs
                     debug:    Verbose. Log all above, plus debug msgs
    -->
    
    <logging level="info"/>


    <!-- =====================================================================
         Tag:     <queryRouter path="xxx"/>
         
         Descrip: When the servlet receives a request (either through HTTP GET 
                  or PUT), it packs up the raw parameters and passes them to this 
                  stylesheet. Its job is simply to determine which query parser
                  stylesheet to run.
                  
                  The path is interpreted relative to the servlet's base
                  directory.
    -->

    <queryRouter path="style/crossQuery/queryRouter.xsl"/>


    <!-- =====================================================================
         Tag:     <errorGen path="xxx"/>
         
         Descrip: When an error occurs (such as an invalid query, work limit
                  exceeded, or an internal error), a stylesheet is used to 
                  produce a nicely formatted page for the requestor. 
                  
                  This tag specifies the path to the stylesheet, relative to 
                  the servlet base directory.

                  See detailed comments in errorGen.xsl for more info.
    -->

    <errorGen path="style/crossQuery/errorGen.xsl"/>


    <!-- =====================================================================
         Tag:     <stylesheetCache size="X" expire="Y">
         
         Descrip: This attribute (if specified) overrides the defaults for 
                  the size (number of entries) and expiration (in seconds) for 
                  the stylesheet cache. Generally these need not be changed.

                  The cache contains compiled versions of stylesheets (query
                  parser, result formatter, etc.)
    -->

    <stylesheetCache size="10" expire="0"/>


    <!-- =====================================================================
         Tag: <dependencyChecking check="yes/no"/>
         
         Descrip: Whenever consulting one of its internal caches, the servlet 
                  can optionally check if the source file(s) have been changed 
                  and if so ignore the cache entry and reload the file(s). 
                  This hurts performance slightly, but makes testing and 
                  development much easier.

                  Set this to "no" for a production system where every last 
                  little bit of speed is critical. Otherwise, leave it "yes".
    -->

    <dependencyChecking check="yes"/>


    <!-- =====================================================================
         Tag: <reportLatency report="yes/no" {cutoffSize="X"}/>
         
         Descrip: When set to "yes", the servlet will report how many
                  milliseconds were spent processing each request (regardless
                  of whether the request succeeded or produced an error page.)
                  
                  The report is logged at the "info" level, so if the 
                  <logging> level above is set to "warnings", "errors", or 
                  "silent", then <reportLatency> will have no effect.
                  
                  Set this to "yes" to gather detailed information on which
                  requests took longest to serve. Set it to "no" if you want
                  to avoid logging and don't need the information.
                  
                  Depending on the data you're looking for, you might want to
                  exclude latency of large requests (e.g. a whole book). You
                  can set the "cutoffSize" attribute to a number of bytes; when
                  any request has output that much data, the servlet will
                  report the latency immediately, labeled "Latency (cutoff)". 
                  When the request finally finishes, the total latency will be
                  reported with the label "Latency (final)". Leaving out the
                  'cutoffSize' attribute, or setting it to zero, disables 
                  cutoff reporting.
    -->

    <reportLatency enable="yes" cutoffSize="0"/>


     <!-- =====================================================================
          Tag:     <stylesheetProfiling profile="yes/no"/>
          
          Descrip: Controls whether a profile is computed for each
          request. The profile prints the file name and line number
          of each XSLT statement in which time was spent, ordered
          by descending time. This gives one a clue where the 
          stylesheet might be optimizable.
          
          Set this to "no" for general use, since computing the 
          profile is somewhat time-consuming.
     -->
     
     <stylesheetProfiling profile="no"/>
     
     
     <!-- =====================================================================
         Tag: <runawayTimer {normalTime="X"} {killTime="Y"}/>
         
         Descrip: This tag (if specified) enables tracking potential "runaway"
                  requests, and/or killing true runaways.
                  
                  'normalTime' specifies the maximum amount of time, in
                  seconds, that requests are generally expected to take. Any
                  requests that exceed this time will be logged (with a call
                  stack trace on Java 5 and above.) If set to zero, no logging
                  of potential runaway requests will be performed.
                  
                  'killTime' specifies the time after which a request is truly
                  considered runaway and should voluntarily kill itself. Note
                  that after this time is exceeded a flag is set, but some
                  parts of XTF do not check this flag and thus the request
                  might not be successfully killed. If set to zero, threads 
                  will never be killed before they complete.
                  
                  If not specified, all runaway timing is disabled.
    -->

    <!-- Uncomment the following to enable runaway timing:
    <runawayTimer normalTime="10" killTime="300"/>
    -->


    <!-- =====================================================================
         Tag: <trackSessions track="yes/no"/>
         
         Descrip: When set to "yes", the servlet will associate a session
                  with each request, and maintain the session state across
                  multiple page views from the same client.
                  
                  If enabled, stylesheets can use XSLT extension functions
                  and elements to store and retrieve session data.
                 
                  ** Deprecated ** Cookie-less mode:
                  By default XTF sessions require the user to have cookies
                  enabled. If you wish to support cookie-less mode, each URL
                  that references a local servlet must be rewritten to add a 
                  session identifier. Add the optional 'encodeURLPattern'
                  attribute to specify a regular expression that matches
                  all the URLs you wish to rewrite. Be sure that all URLs
                  produced synthetically (e.g. by XSLT concat(), 
                  Javascript, etc.) are passed through the Session:encodeURL 
                  XSLT extension function.
    -->

    <trackSessions track="yes"/>


     <!-- =====================================================================
          Tag: <cacheControl allowBrowserCaching="yes/no"/>
          
          Descrip: Since XTF pages are by nature dynamic, it typically does
          not make sense for browsers to cache them, and thus
          allowBrowserCaching should generally be set to "no".
          However, if you have particular performance concerns and
          are prepared to address caching problems (e.g. by adding
          extra URL parameters to AJAX requests) then set it to
          "yes".
          
          When set to "no" as recommended, XTF will insert an HTTP
          header in each response telling browsers that the page
          has expired (meaning it should not be cached.) Other
          cache control HTTP parameters aren't as safe to use and
          cause subtle problems (for instance refer to this
          article: see http://edn.embarcadero.com/print/39141)
     -->
     
     <cacheControl allowBrowserCaching="no"/>
     
     
     <!-- =====================================================================
         PASS-THROUGH TAGS
        
         You may place any other tags you like, and they will be passed as
         parameters to each stylesheet run by the servlet. Thus you can make 
         up your own system-wide parameters, put them below, and then every 
         stylesheet will be able to access them.

         Examples: <mytag value="foo"/>
                   <othertag value="bar"/>
    -->

    <!-- Put pass-through tags here, if you need any. -->

</crossQuery-config>

