Java Web Application Development With Click Framework/Appendix C: Click DTD

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Click application XML descriptor Documentation Type Definition (DTD):

<!-- The Click Application (click.xml) Document Type Definition. -->
<!ELEMENT click-app (pages?, headers?, format?, mode?, controls?, file-item-factory?)>
  <!ATTLIST click-app charset CDATA #IMPLIED>
  <!ATTLIST click-app locale CDATA #IMPLIED>

  <-- Application pages. -->
  <!ELEMENT pages (page*, excludes*)>
     <!ATTLIST pages package CDATA #IMPLIED>
    <!ATTLIST pages automapping (true|false) "true">
    <!ATTLIST pages autobinding (true|false) "true">

    <!-- Page definition. -->
    <!ELEMENT page (header*)>
       <!ATTLIST page path CDATA #REQUIRED>
      <!ATTLIST page classname CDATA #REQUIRED>

    <!-- Excludes definition. -->
    <!ELEMENT excludes (#PCDATA)>
      <!ATTLIST excludes pattern CDATA #REQUIRED>

  <!-- Application default page headers. -->
  <!ELEMENT headers (header*)>
     <!-- Header definition. -->
     <!ELEMENT header (#PCDATA)>
      <!ATTLIST header name CDATA #REQUIRED>
      <!ATTLIST header value CDATA #REQUIRED>
      <!ATTLIST header type (String|Integer|Date) "String">

  <!-- Page template formatter class. An new format object added to
       the Velocity context under the key: "format". -->
  <!ELEMENT format (#PCDATA)>
    <!ATTLIST format classname CDATA #FIXED "">

  <!-- Application mode, which configures logging and caching. -->
  <!ELEMENT mode (#PCDATA)>
     <!ATTLIST mode value (production|profile|development|debug|trace) "development">

  <!-- Application deployable controls. -->
  <!ELEMENT controls (control*, control-set*)>
     <-- Deployable control class. -->
     <!ELEMENT control (#PCDATA)>
      <!ATTLIST control classname CDATA #REQUIRED>

    <-- Deployable Third Party Set of Controls. -->
    <!ELEMENT control-set (#PCDATA)>
      <!ATTLIST control-set name CDATA #REQUIRED>

  <!-- Commons Upload FileItem Factory class. -->
  <!ELEMENT file-item-factory (property*)>
    <!ATTLIST file-item-factory classname CDATA #FIXED "org.apache.commons.fileupload.disk.DiskFileItemFactory">

    <!-- FileItem Factory property set after factory creation. -->
    <!ELEMENT property (#PCDATA)>
      <!ATTLIST property name CDATA #REQUIRED>
      <!ATTLIST property value CDATA #REQUIRED>