~ubuntu-branches/ubuntu/karmic/lire/karmic

« back to all changes in this revision

Viewing changes to doc/dev-manual/ch09.html

  • Committer: Bazaar Package Importer
  • Author(s): Wolfgang Sourdeau
  • Date: 2005-04-25 23:10:41 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050425231041-8h3y0jyvmj0pe05o
Tags: 2:2.0.1-4
debian/control: build-depend an depend on libdbd-sqlite2-perl (>=
2:0.33-4) instead of libdbd-sqlite-perl.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
 
<html>
3
 
<head>
4
 
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
5
 
<title>Chapter 9. Writing a New Report</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.45">
7
 
<link rel="home" href="index.html" title="Lire Developer's Manual">
8
 
<link rel="up" href="pt02.html" title="Part II. Extending Lire">
9
 
<link rel="previous" href="ch08s02.html" title="API for 2DLF Scripts">
10
 
<link rel="next" href="ch09s02.html" title="Report's Display Specification">
11
 
</head>
12
 
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13
 
<div class="navheader">
14
 
<table width="100%" summary="Navigation header">
15
 
<tr><th colspan="3" align="center">Chapter 9. Writing a New Report</th></tr>
16
 
<tr>
17
 
<td width="20%" align="left">
18
 
<a accesskey="p" href="ch08s02.html">Prev</a>�</td>
19
 
<th width="60%" align="center">Part II. Extending Lire</th>
20
 
<td width="20%" align="right">�<a accesskey="n" href="ch09s02.html">Next</a>
21
 
</td>
22
 
</tr>
23
 
</table>
24
 
<hr>
25
 
</div>
26
 
<div class="chapter">
27
 
<div class="titlepage"><div><h2 class="title">
28
 
<a name="chap:writing-report"></a>Chapter 9. Writing a New Report</h2></div></div>
29
 
<div class="toc">
30
 
<p><b>Table of Contents</b></p>
31
 
<dl>
32
 
<dt><a href="ch09.html#sect:report-infos">Report Informations</a></dt>
33
 
<dt><a href="ch09s02.html">Report's Display Specification</a></dt>
34
 
<dt><a href="ch09s03.html">Filter Specification</a></dt>
35
 
<dt><a href="ch09s04.html">Calculation Specification</a></dt>
36
 
</dl>
37
 
</div>
38
 
<p>Writing a new report involves writing a report specification, e.g.
39
 
<tt>/service/&lt;superservice&gt;/reports/top-foo-by-bar.xml</tt>, and
40
 
adding this report along with possible configuration parameters to
41
 
<tt>&lt;service&gt;/&lt;service&gt;.cfg</tt>.  Beware!  The name of the
42
 
report generally consists of alphanumerics and '-', but the name of parameters
43
 
may <span class="emphasis"><i>not</i></span> contain any '-'.  It generally consists of
44
 
alphanumerics and '_'.
45
 
</p>
46
 
<div class="section">
47
 
<div class="titlepage"><div><h2 class="title" style="clear: both">
48
 
<a name="sect:report-infos"></a>Report Informations</h2></div></div>
49
 
<p>
50
 
</div>
51
 
</div>
52
 
<div class="navfooter">
53
 
<hr>
54
 
<table width="100%" summary="Navigation footer">
55
 
<tr>
56
 
<td width="40%" align="left">
57
 
<a accesskey="p" href="ch08s02.html">Prev</a>�</td>
58
 
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
59
 
<td width="40%" align="right">�<a accesskey="n" href="ch09s02.html">Next</a>
60
 
</td>
61
 
</tr>
62
 
<tr>
63
 
<td width="40%" align="left">API for 2DLF Scripts�</td>
64
 
<td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td>
65
 
<td width="40%" align="right">�Report's Display Specification</td>
66
 
</tr>
67
 
</table>
68
 
</div>
69
 
</body>
70
 
</html>
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�9.�The Lire Report Configuration Markup Language</title><meta name="generator" content="DocBook XSL Stylesheets V1.64.1"><link rel="home" href="index.html" title="Lire Developer's Manual"><link rel="up" href="pt03.html" title="Part�III.�Developer's Reference"><link rel="previous" href="ch08.html" title="Chapter�8.�The Lire Report Configuration Specification Markup Language"><link rel="next" href="ch10.html" title="Chapter�10.�The Lire DLF Schema Markup Language"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter�9.�The Lire Report Configuration Markup Language</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch08.html">Prev</a>�</td><th width="60%" align="center">Part�III.�Developer's Reference</th><td width="20%" align="right">�<a accesskey="n" href="ch10.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="chap:lrcml-doc"></a>Chapter�9.�The Lire Report Configuration Markup Language</h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch09.html#id2510428">The Lire Report Configuration Markup Language</a></span></dt><dd><dl><dt><span class="section"><a href="ch09.html#id2510510">config element</a></span></dt><dt><span class="section"><a href="ch09.html#id2510547">global element</a></span></dt><dt><span class="section"><a href="ch09.html#id2510573">param element</a></span></dt></dl></dd></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2510428"></a>The Lire Report Configuration Markup Language</h2></div></div><div></div></div><p>Document Type Definition for the Lire Report Configuration Markup Language.</p><p>This DTD defines a grammar that is used to store the Lire
 
2
   configuration. The configuration is stored in one or more XML
 
3
   files. Parameters set in later configuration files override the
 
4
   ones set in the formers. The valid parameter names as well as their
 
5
   description and type are specified using configuration
 
6
   specification documents.
 
7
  </p><p>Elements of this DTD use the
 
8
   <span class="type">http://www.logreport.org/LRCML/</span> namespace, which is
 
9
   usually mapped to the <tt class="literal">lrcml</tt> prefix.
 
10
  </p><p>The latest version of the DTD is
 
11
   <span class="productnumber">1.0</span> and its public
 
12
   identifier is <span class="productname">-//LogReport.ORG//DTD Lire Report
 
13
   Specification Markup Language V1.0//EN</span>&#8482;.
 
14
   Its canonical system identifier is <a href="http://www.logreport.org/LRCML/1.0/lrcml.dtd" target="_top">http://www.logreport.org/LRCML/1.0/lrcml.dtd</a>.
 
15
  </p><pre class="programlisting">
 
16
 
 
17
&lt;!--                    
 
18
                                                                   --&gt;
 
19
 
 
20
&lt;!--                    Namespace prefix for validation using the
 
21
                        DTD                                        --&gt;
 
22
&lt;!ENTITY % LRCML.xmlns.pfx    "lrcml"                                 &gt;
 
23
&lt;!ENTITY % xmlns.colon       ":"                                     &gt;
 
24
&lt;!ENTITY % LRCML.pfx          "%LRCML.xmlns.pfx;%xmlns.colon;"         &gt;
 
25
&lt;!ENTITY % LRCML.xmlns.attr.name "xmlns%xmlns.colon;%LRCML.xmlns.pfx;" &gt;
 
26
&lt;!ENTITY % LRCML.xmlns.attr
 
27
  "%LRCML.xmlns.attr.name; CDATA #FIXED 'http://www.logreport.org/LRCML/'"&gt;
 
28
 
 
29
&lt;!-- For the module which we are including                          --&gt;
 
30
&lt;!ENTITY % LIRE.pfx           "%LRCML.pfx;"                          &gt;
 
31
 
 
32
  </pre><p>Each configuration specification is an XML document which has one
 
33
   <tt class="sgmltag-element">config</tt> as its root element.
 
34
  </p><pre class="programlisting">
 
35
 
 
36
&lt;!ENTITY % LRCML.config          "%LRCML.pfx;config"                   &gt;
 
37
&lt;!ENTITY % LRCML.global          "%LRCML.pfx;global"                   &gt;
 
38
&lt;!ENTITY % LRCML.param           "%LRCML.pfx;param"                    &gt;
 
39
                                  
 
40
 
 
41
  </pre><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2510510"></a><tt class="sgmltag-element">config</tt> element</h3></div></div><div></div></div><p>Root element of a configuration document. It contains
 
42
    presently only one <tt class="sgmltag-element">global</tt> element which is used
 
43
    to hold the global configuration parameters.
 
44
   </p><p>This element doesn't have any attributes.</p><pre class="programlisting">
 
45
 
 
46
&lt;!ELEMENT %LRCML.config; (%LRCML.global;)                              &gt;
 
47
&lt;!ATTLIST %LRCML.config;
 
48
             %LRCML.xmlns.attr;                                       &gt;
 
49
 
 
50
   </pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2510547"></a><tt class="sgmltag-element">global</tt> element</h3></div></div><div></div></div><p>This element starts the global configuration data. (This is
 
51
    the only scope currently defined). It contains a list of
 
52
    <tt class="sgmltag-element">param</tt> elements.
 
53
   </p><pre class="programlisting">
 
54
 
 
55
&lt;!ELEMENT %LRCML.global; (%LRCML.param;)+                              &gt;
 
56
 
 
57
   </pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2510573"></a><tt class="sgmltag-element">param</tt> element</h3></div></div><div></div></div><p>This element contains the parameter's value. The parameter's
 
58
    name is defined in the <tt class="sgmltag-attribute">name</tt>
 
59
    attribute.
 
60
   </p><p>The <tt class="sgmltag-attribute">value</tt> attribute can be
 
61
        used to store scalar's value.
 
62
   </p><p>When the parameter's type is a list, the values are stored in
 
63
    children <tt class="sgmltag-element">param</tt> elements.
 
64
   </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This element has a mixed content type. We should probably
 
65
     use a <tt class="sgmltag-attribute">value</tt> attribute to
 
66
     hold scalar values.
 
67
    </p></div><pre class="programlisting">
 
68
 
 
69
&lt;!ELEMENT %LRCML.param; (#PCDATA|%LRCML.param;)*                       &gt;
 
70
&lt;!ATTLIST %LRCML.param;
 
71
             name      NMTOKEN                             #REQUIRED
 
72
             value     CDATA                               #IMPLIED &gt;
 
73
 
 
74
   </pre></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch08.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="pt03.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ch10.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter�8.�The Lire Report Configuration Specification Markup Language�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Chapter�10.�The Lire DLF Schema Markup Language</td></tr></table></div></body></html>