Difference between revisions of "Property Groups definition"
m |
|||
Line 24: | Line 24: | ||
<source lang="xml"> | <source lang="xml"> | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
− | <!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups | + | <!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.0//EN" |
− | "http://www.openkm.com/dtd/property-groups- | + | "http://www.openkm.com/dtd/property-groups-2.0.dtd"> |
<property-groups> | <property-groups> | ||
<property-group label="Consulting" name="okg:consulting"> | <property-group label="Consulting" name="okg:consulting"> | ||
Line 36: | Line 36: | ||
Here we can see an XML which describes the "Consulting" property group with a couple of properties. In the description, we can see an INPUT where the user should type an internal code (with a default value of "COD-0000" and a comment which describes the document content. | Here we can see an XML which describes the "Consulting" property group with a couple of properties. In the description, we can see an INPUT where the user should type an internal code (with a default value of "COD-0000" and a comment which describes the document content. | ||
− | As you can see in the XML DOCTYPE, there is a formal definition at http://www.openkm.com/dtd/property-groups- | + | As you can see in the XML DOCTYPE, there is a formal definition at http://www.openkm.com/dtd/property-groups-2.0.dtd. |
− | {{Note|If your OpenKM server can't access to Internet, you can download this DTD and copy to a | + | {{Note|If your OpenKM server can't access to Internet, you can download this DTD and copy to a convenient place at you server. Remember to update your PropertyGroups.xml with the TDT location. |
<source lang="xml"> | <source lang="xml"> | ||
− | <!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups | + | <!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.0//EN" |
− | "file:///path/to/property-groups- | + | "file:///path/to/property-groups-2.0.dtd"> |
</source>}} | </source>}} | ||
But let's see which components it can handle: | But let's see which components it can handle: | ||
− | + | * input | |
− | + | * suggestbox | |
+ | * checkbox | ||
+ | * textarea | ||
+ | * select | ||
+ | * separator | ||
+ | * text | ||
− | + | See [[Form Element description]] for a detailed definition of every form element. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Category: Installation Guide]] | [[Category: Installation Guide]] |
Revision as of 09:10, 19 July 2011
Sometimes you want to add more information to a document, for example, you may want to add an internal code to the document for organization purposes and a description. OpenKM uses two files to describe this metadata: PropertyGroups.cnd and PropertyGroups.xml. The first one describes the properties to be added to the document node. This definition is used by Jackrabbit to retrieve and set these values. The second one is used by OpenKM to render the values described in the previous file.
|
See this sample:
PropertyGroups.cnd
<okm = 'http://www.openkm.org/1.0'>
<okg = 'http://www.openkm.org/group/1.0'>
<okp = 'http://www.openkm.org/group/property/1.0'>
[okg:consulting] mixin
- okp:consulting.code (string) = '' autocreated
- okp:consulting.comment (string) = '' autocreated
PropertyGroups.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.0//EN"
"http://www.openkm.com/dtd/property-groups-2.0.dtd">
<property-groups>
<property-group label="Consulting" name="okg:consulting">
<input label="Code" type="text" name="okp:consulting.code" value="COD-0000" />
<textarea label="Comment" name="okp:consulting.comment" value=""/>
</property-group>
</property-groups>
Here we can see an XML which describes the "Consulting" property group with a couple of properties. In the description, we can see an INPUT where the user should type an internal code (with a default value of "COD-0000" and a comment which describes the document content.
As you can see in the XML DOCTYPE, there is a formal definition at http://www.openkm.com/dtd/property-groups-2.0.dtd.
But let's see which components it can handle:
- input
- suggestbox
- checkbox
- textarea
- select
- separator
- text
See Form Element description for a detailed definition of every form element.