1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
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">
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>
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>
27
<div class="titlepage"><div><h2 class="title">
28
<a name="chap:writing-report"></a>Chapter 9. Writing a New Report</h2></div></div>
30
<p><b>Table of Contents</b></p>
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>
38
<p>Writing a new report involves writing a report specification, e.g.
39
<tt>/service/<superservice>/reports/top-foo-by-bar.xml</tt>, and
40
adding this report along with possible configuration parameters to
41
<tt><service>/<service>.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 '_'.
47
<div class="titlepage"><div><h2 class="title" style="clear: both">
48
<a name="sect:report-infos"></a>Report Informations</h2></div></div>
52
<div class="navfooter">
54
<table width="100%" summary="Navigation footer">
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>
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>
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>™.
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">
20
<!-- Namespace prefix for validation using the
22
<!ENTITY % LRCML.xmlns.pfx "lrcml" >
23
<!ENTITY % xmlns.colon ":" >
24
<!ENTITY % LRCML.pfx "%LRCML.xmlns.pfx;%xmlns.colon;" >
25
<!ENTITY % LRCML.xmlns.attr.name "xmlns%xmlns.colon;%LRCML.xmlns.pfx;" >
26
<!ENTITY % LRCML.xmlns.attr
27
"%LRCML.xmlns.attr.name; CDATA #FIXED 'http://www.logreport.org/LRCML/'">
29
<!-- For the module which we are including -->
30
<!ENTITY % LIRE.pfx "%LRCML.pfx;" >
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">
36
<!ENTITY % LRCML.config "%LRCML.pfx;config" >
37
<!ENTITY % LRCML.global "%LRCML.pfx;global" >
38
<!ENTITY % LRCML.param "%LRCML.pfx;param" >
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">
46
<!ELEMENT %LRCML.config; (%LRCML.global;) >
47
<!ATTLIST %LRCML.config;
48
%LRCML.xmlns.attr; >
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">
55
<!ELEMENT %LRCML.global; (%LRCML.param;)+ >
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>
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
67
</p></div><pre class="programlisting">
69
<!ELEMENT %LRCML.param; (#PCDATA|%LRCML.param;)* >
70
<!ATTLIST %LRCML.param;
71
name NMTOKEN #REQUIRED
72
value CDATA #IMPLIED >
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>