Params form fields

Params forms are based on formal XML definition. The DTD ( Document Type Definition ) defines the structure and the legal elements and attributes of an XML document.

Can see latest DTD in our website http://www.openkm.com/dtd/report-parameters-{major}.{minor}.dtd where {major} and {minor} values are two numbers ( major release and minor release ). For example the location for version 2.0 of the dtd is http://www.openkm.com/dtd/report-parameters-2.0.dtd

Each application version supports only a couple of DTD definitions, read Application version compatibility table to see which are supported by your application.

Basic XML skeleton

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE report-parameters PUBLIC "-//OpenKM//DTD Report Parameters 2.0//EN"
                                   "http://www.openkm.com/dtd/report-parameters-2.0.dtd">
<report-parameters>

</report-parameters>
  • The DOCTYPE is a formal definition of some DTD. In the previous example the report-parameters-2.0.dtd.
  • The XML begins with <report-parameters> tag and ends with </report-parameters>. Into this hicheracy are defined the metada groups.

Basic example

Available field types:

  • Checkbox
  • Input
  • Select
  • Separator
  • Suggestbox
  • Text
  • TextArea

More information about field type elements at Params fields 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE report-parameters PUBLIC "-//OpenKM//DTD Report Parameters 2.0//EN"
                                   "http://www.openkm.com/dtd/report-parameters-2.0.dtd">
<report-parameters>
  <input label="From" name="from_date" type="date">
    <validator type="req"/>
  </input>
  <input label="To" name="to_date" type="date">
    <validator type="req"/>
  </input>
</report-parameters>

Using file system DTD

If the server has no access to the Internet, then the DTD file must be accessible in some way, for example can store a copy in your application server.

The XML definition must be changed to refer the new DTD location, otherwise you will get and application error while trying to processing DTD file.

Can be file system ( example below ) or a valid intranet URL.

<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.0//EN"
                                 "file:///home/openkm/report-parameters-2.0.dtd">
  • In the example, /home/openkm/report-parameters-2.0.dtd is the file system path to the file.