Ir al contenido
Otras versiones

Cargando…

Metadata XML definition

Esta página aún no está disponible en tu idioma.

The application metada is based on a formal XML definition. The DTD ( Document Type Definition ) defines the structure and the legal elements and attributes of an XML document.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.5//EN"
"http://www.openkm.com/dtd/property-groups-2.5.dtd">
<property-groups>
</property-groups>
  • The DOCTYPE is a formal definition of some DTD. In the previous example the property-groups-2.5.dtd.
  • The XML begins with tag and ends with . Into this hicheracy are defined the metada groups.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.5//EN"
"http://www.openkm.com/dtd/property-groups-2.5.dtd">
<property-groups>
<property-group label="Consulting" name="okg:consulting">
</property-group>
</property-groups>
  • Each  …</property-group  block identify the begining and end of new metadata group definition.
  • Each metadata group has a label - used by user interface - Consulting.
  • Each metadata group has a unique name, okg:consulting.
  • The metadata group name always must starts with “okg:” ( OpenKGroup ).
  • Must not use special characters for name.
Attribute Description Required
label The text shown as a label in the user interface. true
name Unique field identifier.
Two metadata groups can’t have the same name. Name must be unique.
The name must start with “okg:”.
Please, use only letters, numbers and underscore: “0-9a-zA-Z_”.
true
visiable Show or hide the metadata.
Allowed values are:
- true.
- false.
By default the metadata are visible.
false
readonly Metadata values can not be modified from user interface only from API.
Allowed values are:
- true.
- false.
By default the metadata are modificable.
false
defaultValueClassName Set custom JAVA class for setting initial default values. false

Available field types:

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

More information about field type elements at Metadata fields

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.5//EN"
"http://www.openkm.com/dtd/property-groups-2.5.dtd">
<property-groups>
<property-group label="Consulting" name="okg:consulting">
<input label="Input label" name="okp:consulting.input1" />
<separator label="Separator label" name="okp:consulting.separator" />
<input label="Input label" name="okp:consulting.input2" />
</property-group>
</property-groups>

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.

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