Creating the report data file
Generally speaking, data files may be created in several vays. One can use xsl transformation tables
to generate proper xml from another xml document (like KSpread spreadsheet), another will use
own program to fetch data from a database and fill the data file. In this tutorial we will
simply create it by hand. The source code for the example can be found in file sample1.kud
or copied from the example below.
<?xml version=“1.0” encoding=“UTF-8”?>
<!DOCTYPE KugarData [
<!ELEMENT KugarData (Row* )>
<!ATTLIST KugarData
Template CDATA #REQUIRED>
<!ELEMENT Row EMPTY>
<!ATTLIST Row
level CDATA #REQUIRED
title CDATA #REQUIRED
version CDATA #REQUIRED
platform CDATA #REQUIRED
copies CDATA #REQUIRED>
]>
<KugarData Template="sample1.kut">
<Row level="0" title=" BRU" version="15.0" platform="x86" copies="1"/>
<Row level="0" title=" Caldera Open Linux" version="2.2" platform="x86" copies="3"/>
<Row level="0" title=" K Desktop" version="1.1.1" platform="x86" copies="1"/>
<Row level="0" title=" Netscape Communicator" version="4.6" platform="x86" copies="10"/>
<Row level="0" title=" Redhat Linux" version="5.0" platform="x86" copies="11"/>
<Row level="0" title=" Redhat Linux" version="5.1" platform="x86" copies="12"/>
<Row level="0" title=" Redhat Linux" version="5.2" platform="x86" copies="14"/>
<Row level="0" title=" Redhat Linux" version="6.0" platform="x86" copies="15"/>
<Row level="0" title=" Star Office" version="5.0" platform="x86" copies="1"/>
<Row level="0" title=" Star Office" version="5.1" platform="x86" copies="3"/>
<Row level="0" title=" Microsoft Windows NT" version="3.1" platform="x86" copies="1"/>
<Row level="0" title=" Microsoft Windows NT" version="3.51" platform="x86" copies="1"/>
<Row level="0" title=" Microsoft Windows NT" version="4.0" platform="x86" copies="1"/>
<Row level="0" title=" Microsoft Windows NT" version="5.0" platform="x86" copies="1"/>
<Row level="0" title=" Sun Solaris" version="2.5" platform="Sparc" copies="1"/>
</KugarData>