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

<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<!-- Configuration file for the dynaXML dynamic publishing servlet.         -->
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<dynaXML-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:     <reverseProxy IP="aaa.bbb.ccc.ddd" {marker="X"}/>

        Descrip: If IP-based authentication is used with a reverse proxy, the
                 servlet will need to be able to determine the requestor's real
                 IP address. It can do this by detecting the reverse proxy's IP
                 and then parsing the X-Forwarded-For marker (an alternate
                 marker may be specified using the 'marker' attribute).
    -->

    <!-- =====================================================================
         Tag:     <docReqParser path="xxx" params="yyy"/>

         Descrip: When a request is made for a particular document (by
                  specifying docId or somesuch in the URL), dynaXML will run
                  the docRequestParser (an XSLT stylesheet) to obtain the
                  the source path, formatter stylesheet, branding profile, and
                  authentication info for that document.

                  The path is interpreted relative to the servlet's base
                  directory.

                  Each URL parameter will be passed in tokenized and
                  untokenized form, just like parameters to crossQuery's 
                  queryParser.

                  See descriptive comments in docReqParser.xsl for details.
    -->

    <docReqParser path="style/dynaXML/docReqParser.xsl"/>


    <!-- =====================================================================
         Tag:     <errorGen path="xxx"/>

         Descrip: When an error occurs (either authorization 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/dynaXML/errorGen.xsl"/>


    <!-- =====================================================================
         Tags:    <stylesheetCache size="X" expire="Y">
                  <reqParserCache size="X" expire="Y">
                  <ipListCache size="X" expire="Y"/>
                  <authCache size="X" expire="Y"/>
                  <loginCache size="X" expire="Y"/>

         Descrip: These attributes (if specified) override the defaults for
                  the size (number of entries) and expiration (in seconds) for
                  the various caches maintained by the servlet. Generally these
                  need not be changed.

                  Here is what each cache contains:

                  stylesheetCache  Compiled versions of stylesheets (request
                                   parser, doc formatter, etc.)

                  ipListCache      Compiled versions of IP lists (used only for
                                   IP-address based authentication.)

                  authCacheSize    Session IDs of successful authentication
                                   attempts (LDAP or external). When expired,
                                   the user will be forced to log in again.

                  loginCache       Security info for external logins, to verify
                                   authentication when user returns from the
                                   external page. If it expires while user is
                                   logging in, they will be forced to try again.

    -->

    <stylesheetCache size="10" expire="0"/>
    <ipListCache size="30" expire="0"/>
    <authCache size="1000" expire="1800"/>
    <loginCache size="1000" expire="120"/>


    <!-- =====================================================================
         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 "(cutoff exceeded)". 
                  When the request finally finishes, the total latency will be
                  reported with the label "(final)". Leaving out this 
                  attribute, or setting it to zero, disables cutoff behavior.
    -->

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


    <!-- =====================================================================
         Tag:     <stylesheetProfiling profile="yes/no"/>
         
         Descrip: Controls whether a profile is computed for each document
                  request. The profile prints the file name and line number
                  of each XSLT statement that accesses an XML node, ordered
                  by descending count. This gives one a clue where the
                  stylesheet is spending its time and thus could possibly
                  be optimized.
                  
                  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: <lazyTrees use="yes/no" buildAlone="yes/no"/>
         
         Descrip: Lazy trees speed up processing of documents in dynaXML, if
                  the same document is accessed more than once.
                  
                  The 'use' attribute controls whether dynaXML will use
                  lazy trees, and it defaults to "yes". If you are having
                  trouble with the lazy trees, you can turn them off to debug.
         
                  The 'buildAlone' attribute controls whether dynaXML will
                  build lazy trees by itself, independently of textIndexer.
                  It defaults to "no", since most users also index their
                  documents to make them searchable. Building lazy trees only
                  at index-time keeps them in sync with the index.
                  
                  However, if you are using dynaXML standalone and without the
                  textIndexer, you may wish to change this to "yes", telling
                  dynaXML to create missing lazy trees (and re-create lazy
                  trees that are out of date).
    -->

    <lazyTrees use="yes" buildAlone="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. -->

</dynaXML-config>

