<document>
  <header>
    <product>resin</product>
    <title>resin.conf Relax-NG Schema</title>
    <version>Resin 3.0</version>
    <description>
      <p>The formal definition for the resin.conf configuration.</p>
    </description>
  </header>

  <body>
    <summary/>

<s1 title="Relax-NG Schema">

<def title="com/caucho/server/resin/resin.rnc">
default namespace r = "http://caucho.com/ns/resin"
namespace l = ""

include "resin-content.rnc"

start = r_resin | l_resin
</def>

<def title="com/caucho/server/resin/server.rnc">
default namespace r = "http://caucho.com/ns/resin"

include "resin-content.rnc"

start = element server {
  r_class-loader-Group?,

  r_server-Content
}

</def>

<def title="com/caucho/server/resin/resin.rnc">
default namespace r = "http://caucho.com/ns/resin"
namespace rcore = "http://caucho.com/ns/resin/core"
namespace local = ""
namespace l = ""

include "../webapp/resin-web-xml-content.rnc"

l_resin = element l:caucho.com {
  r_any-Group
}

r_access-log = element access-log {
  r_resin-type?

  &amp; r_log-Content

  &amp; (attribute format { string } | element format { string })?

  &amp; (attribute archive-format { string } | element archive-format { string })?

  &amp; r_init?
}

r_cache = element cache {
  r_path?

  &amp; (attribute enable { r_boolean-Type }
     | element enable { r_boolean-Type })?

  &amp; (attribute entries { r_int } | element entries { r_int })?

  &amp; (attribute memory-size { r_int } | element memory-size { r_int })?

  &amp; (attribute disk-size { r_int } | element disk-size { r_int })?
}

r_document-directory =
 (attribute document-directory { string }

  | element document-directory { string })

r_host = element host {
  (attribute id { string }
   | attribute regexp { string }
   | element regexp { string })?

  &amp; (attribute host-name { string } | element host-name { string })?

  &amp; (attribute secure-host-name { string }
    | element secure-host-name { string })?

  &amp; (attribute host-alias { string } | element host-alias { string })*

  &amp; r_lazy-init?

  &amp; r_startup-mode?

  &amp; r_root-directory?

  &amp; r_host-Group
}

r_host-Content =
  r_env-Content

  &amp; r_access-log?

  &amp; r_class-loader-Group

  &amp; r_document-directory?

  &amp; r_ear-default*

  &amp; r_ear-deploy*

  &amp; r_error-page*

  &amp; r_web-app-deploy*

  &amp; r_web-app-default*

  &amp; rc_web-app*

## &lt;host&gt; flow control
r_host-Flow =
  r_host-Content

  &amp; element rcore:env { rcore_env-Args, r_host-Flow }*

  &amp; element rcore:if { rcore_if-Args, r_host-Flow }*

  &amp; element rcore:choose {
      element rcore:when { rcore_when-Args, r_host-Flow }+,
      element rcore:otherwise { r_host-Flow }?
    }*

## The complete host contents
r_host-Group = r_host-Flow

r_host-default = element host-default {
  r_host-Group
}

r_host-deploy = element host-deploy {
  r_path

  &amp; (attribute archive-directory { r_path-Type }
     | element archive-directory { r_path-Type })?

  &amp; (attribute expand-directory { r_path-Type }
     | element expand-directory { r_path-Type })?

  &amp; (attribute host-name { string }
     | element host-name { string })?

  &amp; (attribute lazy-init { r_boolean-Type }
     | element lazy-init { r_boolean-Type })?

  &amp; r_host-default?
}

r_http = element http {
  (attribute id { string }
   | attribute server-id { string }
   | element server-id { string })?

  &amp; r_port-Content

  &amp; (attribute virtual-host { string } | element virtual-host { string })?
}

r_ignore-client-disconnect =
  attribute ignore-client-disconnect { string }
  | element ignore-client-disconnect { string }

r_keepalive-max =
  attribute keepalive-max { string }
  | element keepalive-max { string }

r_keepalive-timeout =
  attribute keepalive-timeout { string }
  | element keepalive-timeout { string }

r_min-free-memory =
  attribute min-free-memory { string }
  | element min-free-memory { string }

r_persistent-store = element persistent-store {
  r_jndi-name?

  &amp; (attribute type { string } | element type { string })

  &amp; r_init?

  &amp; (attribute max-idle-time { r_period }
     | element max-idle-time { r_period })?
}

r_ping = element ping {
  r_any-Group*
}

r_port = element port {
  (attribute id { string }
   | attribute server-id { string }
   | element server-id { string })?

  &amp; r_port-Content

  &amp; (attribute index { string } | element index { string })?

  &amp; (attribute group { string } | element group { string })?

  &amp; (attribute backup { string } | element backup { string })?

  &amp; r_protocol
}

r_port-Content =
  ((attribute port { string } | element port { string })

   &amp; (attribute host { string } | element host { string })?

   &amp; (attribute read-timeout { r_period-Type }
      | element read-timeout { r_period-Type })?

   &amp; (attribute write-timeout { r_period-Type }
      | element write-timeout { r_period-Type })?

   &amp; (attribute socket-listen-backlog { r_int-Type }
      | element socket-listen-backlog { r_int-Type })?

   &amp; (attribute tcp-no-delay { string } | element tcp-no-delay { string })?

   &amp; (r_openssl | r_jsse-ssl)?
   )

r_protocol =
  element protocol {
    r_resin-type,

    r_any-Group*
  }

r_resin = element resin {
  r_resin-Content
}

## &lt;resin&gt; basic contents
r_resin-Basis = 
  r_env-Basis

  &amp; (attribute user-name { string } | element user-name { string })?

  &amp; (attribute group-name { string } | element group-name { string })?

  &amp; r_min-free-memory?

  &amp; (attribute security-provider { string }
    | element security-provider { string })*

  &amp; (attribute security-manager { string }
    | element security-manager { string })*

  &amp; r_server*

  &amp; r_thread-pool?

  &amp; r_transaction-manager?

## &lt;resin&gt; flow control
r_resin-Flow =
  r_resin-Basis

  &amp; element rcore:env { rcore_env-Args, r_resin-Flow }*

  &amp; element rcore:if { rcore_if-Args, r_resin-Flow }*

  &amp; element rcore:choose {
      element rcore:when { rcore_when-Args, r_resin-Flow }+,
      element rcore:otherwise { r_resin-Flow }?
    }*

r_resin-Content = r_resin-Flow

r_root-directory =
  attribute root-directory { string }
  | element root-directory { string }

r_server = element server {
  r_root-directory?,

  r_server-Content
}

## &lt;server&gt; basic contents
r_server-Basis = 
  r_env-Basis

  &amp; r_access-log?

  &amp; r_cache?

  &amp; r_ear-default*

  &amp; r_http*

  &amp; r_host*

  &amp; r_host-default*

  &amp; r_host-deploy*

  &amp; r_ignore-client-disconnect?

  &amp; r_keepalive-max?

  &amp; r_keepalive-timeout?

  &amp; r_persistent-store?

  &amp; r_ping*

  &amp; r_port*

  &amp; r_session-cookie?

  &amp; r_session-url-prefix?

  &amp; r_url-character-encoding?

  &amp; r_web-app-default*

## &lt;server&gt; flow control
r_server-Flow =
  (r_class-loader-Group?, r_server-Basis)

  &amp; element rcore:env { rcore_env-Args, r_server-Flow }*

  &amp; element rcore:if { rcore_if-Args, r_server-Flow }*

  &amp; element rcore:choose {
      element rcore:when { rcore_when-Args, r_server-Flow }+,
      element rcore:otherwise { r_server-Flow }?
    }*

## complete &lt;server&gt; contents
r_server-Content = r_server-Flow

r_session-cookie = 
  attribute session-cookie { string }
  | element session-cookie { string }

r_session-url-prefix =
  attribute alternate-session-url-prefix { string }
  | element alternate-session-url-prefix { string }
  | attribute session-url-prefix { string }
  | element session-url-prefix { string }

r_spare-thread-max =
  attribute spare-thread-max { string }
  | element spare-thread-max { string }

r_spare-thread-min =
  attribute spare-thread-min { string }
  | element spare-thread-min { string }

r_thread-pool = element thread-pool {
  r_thread-max?

  &amp; r_spare-thread-min?
}

r_thread-max =
  attribute thread-max { string }
  | element thread-max { string }

r_transaction-log = element transaction-log {
  r_path+
}

r_transaction-manager = element transaction-manager {
  r_transaction-log?
}

r_url-character-encoding =
  attribute url-character-encoding { string }
  | element url-character-encoding { string }
</def>

</s1>

  </body>
</document>