MMBase
Homepage / Roadmap - bugs / Archived projects

Persons

Gerard van Enk (project leader)

Case Roole

Daniel Ockeloen

Rob Vermeulen

XML Configuration

The XML Configuration project tries to make the current avaiable configuration setup much more elegant. This document describes the status of the XML configuration project.

The most import reasons to begin this project was to make the configuration direcories much more elegant. So that it is obvious were to find files and keep it maintainable.

The current project status can be seen below.

The XML parser will be the Apache Xerces parser and this parser will be placed into the MMBase distribution into the /org/mmbase/lib directory.
The new configuration files will be shadowed with the old configuration files, if everything works the old configuration files will be removed from the distribution.

New directory structure.
The new directory structure will exists of three directories:
/config/databases/
/config/modules/
/config/builders/
Whats in this directories and how things are organized will be descibed below.

/config/databases/
Is this directory, xml files will be given for each supported database type. The following file gives an example of the mysql database.

<BUILDERSQL server="mysql">
<CREATE>Here is the create query</CREATE>
<INSERT>Here is the insert query template</INSERT>
<UPDATE>Here is the update query template</UPDATE>
</BUILDERSQL>

/config/modules/
Is this directory xml configuration files will be given for each module.


/config/builders/
Is this directory xml configuration files will be given for each builder. The example below describes the url builder.

url.xml
----------------------------------------------------------
<builder>
<names>
<buildername xml:lang="nl">Springer</buildername>
<buildername xml:lang="en">Jumper</buildername>
</names>
<descriptions>
<description xml:lang="en">urls to external sites</description>
<description xml:lang="nl">urls naar externe sites</description>
</descriptions>
<status>activated</status>
<classfile>nl.eo.org.mmbase.builders.bbb</classfile>
<tablename>url</tablename>
<properties>
<property name="speed" value="turbo">
</properties>

<fields>
<field>
<gui>
<name xml:lang="nl">Eigenaar</name>
<name xml:lang="en">Owner</name>
<type>string</type>
<positions>
<editor>-1</editor>
<list>11</list>
<search>11</search>
</positions>
</gui>
<dbfield type="varchar" size="255" state="persistent" null="yes">owner</dbfield>
</field>

<field>
<gui>
<name xml:lang="en">Object</name>
<name xml:lang="nl">Object</name>
<type>integer</type>
<positions>
<editor>-1</editor>
<list>10</list>
<search>10</search>
</positions>
</gui>
<dbfield type="int" size="255" state="persistent" null="no">number</dbfield>
</field>
</fields>
</builder>

The DTDs for all builders will look like:

<!ELEMENT builder (names, descriptions, status, classfile, tablename, params, fields)>
<!ELEMENT names (buildename+)>
<!ELEMENT buildername (#PCDATA)>
<!ATTLIST buildername xml:lang CDATA #REQUIRED>
<!ELEMENT descriptions (description*)>
<!ELEMENT description (#PCDATA)>
<!ATTLIST description xml:lang CDATA #REQUIRED>
<!ELEMENT status ("activated"|"inactive")>
<!ELEMENT classfile (#PCDATA)>
<!ELEMENT tablename (#PCDATA)>
<!ELEMENT properties (property)>
<!ELEMENT property (#PCDATA)>
<!ATTLIST property name CDATA #REQUIRED>
<!ATTLIST property value CDATA #REQUIRED>

<!ELEMENT fields (field+)>
<!ELEMENT field (gui,dbfield)>
<!ELEMENT gui (name+,type,position)>
<!ELEMENT name (#PCDATA)>
<!ATTLIST name xml:lang CDATA #REQUIRED>
<!ELEMENT type (#PCDATA)>
<!ELEMENT position (editor,list,search)>
<!ELEMENT editor (#PCDATA)>
<!ELEMENT list (#PCDATA)>
<!ELEMENT search (#PCDATA)>
<!ELEMENT dbfield (#PCDATA)>
<!ATTLIST dbfield type CDATA #REQUIRED>
<!ATTLIST dbfield size CDATA #IMPLIED>
<!ATTLIST dbfield state (persistent|volatile|temporary) #REQUIRED>
<!ATTLIST dbfield null (yes|no) #REQUIRED>