<!-- if you want to validate this file separately, uncomment this prolog:

<?xml version="1.0" ?>
<!DOCTYPE chapter PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd">

-->

<chapter id="kugardata-element">
<title><sgmltag class="element">KugarData</sgmltag></title>

<para>
The <sgmltag class="element">KugarData</sgmltag> element defines a
report's data source.  The basic structure is a collection of rows and
columns. This document does not define data types and their attributes
at this time. The report template defines column data type information.
</para>

<para>
The document creator can apply an &XSL; style sheet to an existing
document to convert it to this format.  If &XSL; is used, the creator
can apply custom macros using &XSL; for column calculations, sorting,
&etc;.
</para>

<synopsis>
&lt;!ELEMENT KugarData (<link linkend="row-element">Row</link>* )&gt;
&lt;!ATTLIST KugarData
 <link linkend="template-att">Template</link> CDATA  #REQUIRED&gt;

&lt;!ELEMENT <link linkend="row-element">Row</link> EMPTY&gt;
&lt;!ATTLIST <link linkend="row-element">Row</link>
 <link linkend="column-att">col1</link>   CDATA  #REQUIRED
 <link linkend="column-att">col2</link>   CDATA  #REQUIRED
 <link linkend="column-att">...</link>    CDATA  #REQUIRED
 <link linkend="column-att">coln</link>   CDATA  #REQUIRED&gt;
</synopsis>

<variablelist>
<varlistentry>
<term>Elements</term>
<listitem>

<variablelist>
<varlistentry id="row-element">
<term><sgmltag class="element">Row</sgmltag></term>
<listitem>
<para>
The <sgmltag class="element">KugarData</sgmltag> element contains zero
or more <sgmltag class="element">Row</sgmltag> elements.  A <sgmltag
class="element">Row</sgmltag> must contain one or more attributes
representing data columns.
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>

<varlistentry>
<term>Attributes</term>
<listitem>

<variablelist>
<varlistentry id="template-att">
<term><sgmltag class="attribute">Template</sgmltag></term>
<listitem>
<para>
This is an attribute of the <sgmltag class="element">KugarData</sgmltag>
element.  The value of the attribute is the &URL; of the report template
used to format the data.
</para>
</listitem>
</varlistentry>

<varlistentry id="column-att">
<term><sgmltag class="attribute">Column</sgmltag></term>
<listitem>
<para>
This is an attribute of the <link linkend="row-element"><sgmltag
class="element">Row</sgmltag></link>.  The name of the attribute is the
column name, and uses the format as given in the <sgmltag
class="element">KugarData</sgmltag> definition.  The attribute name is
used in the report template to bind the data to the report fields.
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>

</chapter>
