/usr/share/doc/lire/dev-manual/ch11.html is in lire-devel-doc 2:2.1.1-2.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 11. The Lire Report Specification Markup Language</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><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="prev" href="ch10.html" title="Chapter 10. The Lire DLF Schema Markup Language"><link rel="next" href="ch12.html" title="Chapter 12. The Lire Report 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 11. The Lire Report Specification Markup Language</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch10.html">Prev</a> </td><th width="60%" align="center">Part III. Developer's Reference</th><td width="20%" align="right"> <a accesskey="n" href="ch12.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 11. The Lire Report Specification Markup Language"><div class="titlepage"><div><div><h2 class="title"><a name="chap:lrsml-doc"></a>Chapter 11. The Lire Report Specification Markup Language</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch11.html#id409522">The Lire Report Specification Markup Language</a></span></dt><dd><dl><dt><span class="section"><a href="ch11.html#id409600"><code class="sgmltag-element">report-spec</code> element</a></span></dt><dt><span class="section"><a href="ch11.html#id409725"><code class="sgmltag-element">global-filter-spec</code> element</a></span></dt><dt><span class="section"><a href="ch11.html#id409843"><code class="sgmltag-element">display-spec</code> element</a></span></dt><dt><span class="section"><a href="ch11.html#id409870"><code class="sgmltag-element">param-spec</code> element</a></span></dt><dt><span class="section"><a href="ch11.html#id409892"><code class="sgmltag-element">param</code> element</a></span></dt><dt><span class="section"><a href="ch11.html#id409975"><code class="sgmltag-element">chart-configs</code> element</a></span></dt><dt><span class="section"><a href="ch11.html#id409998">Filter expression elements</a></span></dt><dt><span class="section"><a href="ch11.html#id410341">Report Calculation Elements</a></span></dt></dl></dd></dl></div><div class="section" title="The Lire Report Specification Markup Language"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id409522"></a>The Lire Report Specification Markup Language</h2></div></div></div><p>Document Type Definition for the Lire Report Specification
Markup Language.</p><p>This DTD defines a grammar that is used to specify reports
that can be generated by Lire. Elements of this DTD uses the
<span class="type">http://www.logreport.org/LRSML/</span> namespace that is
usually mapped to the <code class="literal">lire</code> prefix.
</p><p>The latest version of that DTD is
<span class="productnumber">2.1</span> and its public
identifier is <span class="productname">-//LogReport.ORG//DTD Lire Report
Specification Markup Language V2.1//EN</span>™.
Its canonical system identifier is <a class="ulink" href="http://www.logreport.org/LRSML/2.1/lrsml.dtd" target="_top">http://www.logreport.org/LRSML/2.1/lrsml.dtd</a>.
</p><pre class="programlisting">
<!--
-->
<!-- Namespace prefix for validation using the
DTD -->
<!ENTITY % LIRE.xmlns.pfx "lire" >
<!ENTITY % LIRE.pfx "%LIRE.xmlns.pfx;:" >
<!ENTITY % LIRE.xmlns.attr.name "xmlns:%LIRE.xmlns.pfx;" >
<!ENTITY % LIRE.xmlns.attr
"%LIRE.xmlns.attr.name; CDATA #FIXED 'http://www.logreport.org/LRSML/'">
<!ENTITY % LRCML.xmlns.pfx "lrcml" >
<!ENTITY % LRCML.pfx "%LRCML.xmlns.pfx;:" >
<!ENTITY % LRCML.xmlns.attr.name "xmlns:%LRCML.xmlns.pfx;">
<!ENTITY % LRCML.xmlns.attr
"%LRCML.xmlns.attr.name; CDATA #FIXED 'http://www.logreport.org/LRCML/'">
</pre><p>This DTD uses the common modules <span class="type">lire-types.mod</span>
which defines the data types recognized by Lire and
<span class="type">lire-desc.mod</span> which is used to include a subset of
DocBook in description and text elements.
</p><pre class="programlisting">
<!ENTITY % lire-types.mod PUBLIC
"-//LogReport.ORG//ENTITIES Lire Data Types V1.0//EN"
"lire-types.mod">
%lire-types.mod;
<!ENTITY % lire-desc.mod PUBLIC
"-//LogReport.ORG//ELEMENTS Lire Description Elements V2.0//EN"
"lire-desc.mod">
%lire-desc.mod;
</pre><p>Each report specification is a XML document which has one
<code class="sgmltag-element">report-spec</code> as its root element. This DTD can
also be used for filter specification which have one
<code class="sgmltag-element">global-filter-spec</code> as root element.
</p><pre class="programlisting">
<!ENTITY % LIRE.report-spec "%LIRE.pfx;report-spec" >
<!ENTITY % LIRE.global-filter-spec "%LIRE.pfx;global-filter-spec">
<!ENTITY % LIRE.display-spec "%LIRE.pfx;display-spec" >
<!ENTITY % LIRE.param-spec "%LIRE.pfx;param-spec" >
<!ENTITY % LIRE.param "%LIRE.pfx;param" >
<!ENTITY % LIRE.chart-configs "%LIRE.pfx;chart-configs" >
<!ENTITY % LRCML.param "%LRCML.pfx;param" >
<!ENTITY % LIRE.filter-spec "%LIRE.pfx;filter-spec" >
<!ENTITY % LIRE.report-calc-spec "%LIRE.pfx;report-calc-spec" >
<!ELEMENT %LRCML.param; (#PCDATA|%LRCML.param;)* >
<!ATTLIST %LRCML.param;
name NMTOKEN #REQUIRED
value CDATA #IMPLIED >
</pre><div class="section" title="report-spec element"><div class="titlepage"><div><div><h3 class="title"><a name="id409600"></a><code class="sgmltag-element">report-spec</code> element</h3></div></div></div><p>Root element of a report specification. It contains
descriptive elements about the report specification
(<code class="sgmltag-element">title</code>, <code class="sgmltag-element">description</code>). It
contains the display elements that will be in the generated report
(<code class="sgmltag-element">display-spec</code>).
</p><p>It contains specification for the parameters that can be used
to customize the report generated from this specification
(param-spec). Finally, it contains elements to specify a filter
expression which can be used to select a subset of the records
(<code class="sgmltag-element">filter-spec</code>) and the expression to build the
report (<code class="sgmltag-element">report-calc-spec</code>).
</p><div class="variablelist" title="report-spec's attributes"><p class="title"><b><code class="sgmltag-element">report-spec</code>'s attributes</b></p><dl><dt><span class="term">id</span></dt><dd><p>the name of the superservice for which this report is
available : i.e. email, www, dns, etc.
</p></dd><dt><span class="term">schema</span></dt><dd><p>The DLF schema used by the report. This defaults to the
superservice's schema, but can be one of its derived or
extended schema.
</p></dd><dt><span class="term">joined-schemas</span></dt><dd><p>A whitespace delimited list of additional schemas that
will be joined for this report. This will make all fields
define in these schemas available for the operators. The
schemas that can be joined depends on the specification's schema.
</p></dd><dt><span class="term">id</span></dt><dd><p>An unique identifier for the report specification</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.report-spec;
(%LIRE.title;, %LIRE.description;,
(%LIRE.param-spec;)?, %LIRE.display-spec;,
(%LIRE.filter-spec;)?, (%LIRE.chart-configs;)?,
%LIRE.report-calc-spec;)
>
<!ATTLIST %LIRE.report-spec;
id ID #REQUIRED
superservice %superservice.type; #REQUIRED
schema NMTOKEN #IMPLIED
joined-schemas NMTOKENS #IMPLIED
%LIRE.xmlns.attr;
%LRCML.xmlns.attr; >
</pre></div><div class="section" title="global-filter-spec element"><div class="titlepage"><div><div><h3 class="title"><a name="id409725"></a><code class="sgmltag-element">global-filter-spec</code> element</h3></div></div></div><p>Root element of a filter specification. It contains
descriptive elements about the filter specification
(<code class="sgmltag-element">title</code>, <code class="sgmltag-element">description</code>). It
contains the display elements that will be used when that filter
is used in a generated report (<code class="sgmltag-element">display-spec</code>).
It contains specification for the parameters that can be used to
customize the filter generated from this specification
(<code class="sgmltag-element">param-spec</code>). Finally, it contains element to
specify the filter expression which can be used to select a subset
of the records (<code class="sgmltag-element">filter-spec</code>).
</p><div class="variablelist" title="global-filter-spec's attributes"><p class="title"><b><code class="sgmltag-element">global-filter-spec</code>'s attributes</b></p><dl><dt><span class="term">superservice</span></dt><dd><p>the name of the superservice for which this filter is
available : i.e. email, www, dns, etc.
</p></dd><dt><span class="term">schema</span></dt><dd><p>the DLF schema used by the report. This defaults to the
superservice's schema, but can be one of its derived or
extended schema.</p></dd><dt><span class="term">joined-schemas</span></dt><dd><p>A whitespace delimited list of additional schemas that
will be joined for this report. This will make all fields
define in these schemas available for the operators. The
schemas that can be joined depends on the specification's schema.
</p></dd><dt><span class="term">id</span></dt><dd><p>An unique identifier for the filter specification</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.global-filter-spec;
(%LIRE.title;, %LIRE.description;,
(%LIRE.param-spec;)?, %LIRE.display-spec;,
(%LIRE.filter-spec;))
>
<!ATTLIST %LIRE.global-filter-spec;
id ID #REQUIRED
superservice %superservice.type; #REQUIRED
schema NMTOKEN #IMPLIED
joined-schemas NMTOKENS #IMPLIED
%LIRE.xmlns.attr; >
</pre></div><div class="section" title="display-spec element"><div class="titlepage"><div><div><h3 class="title"><a name="id409843"></a><code class="sgmltag-element">display-spec</code> element</h3></div></div></div><p>This element contains the descriptive element that will appear
in the generated report.</p><p>It contains one title and may contains one description which
will be used as help message</p><p>This element has no attribute.</p><pre class="programlisting">
<!ELEMENT %LIRE.display-spec; (%LIRE.title;, (%LIRE.description;)?) >
</pre></div><div class="section" title="param-spec element"><div class="titlepage"><div><div><h3 class="title"><a name="id409870"></a><code class="sgmltag-element">param-spec</code> element</h3></div></div></div><p>This element contains the parameters than can be customized in
this report specification.</p><p>This element doesn't have any attribute.</p><pre class="programlisting">
<!ELEMENT %LIRE.param-spec; (%LIRE.param;)+ >
</pre></div><div class="section" title="param element"><div class="titlepage"><div><div><h3 class="title"><a name="id409892"></a><code class="sgmltag-element">param</code> element</h3></div></div></div><p>This element contains the specification for a parameter than
can be used to customize this report.</p><p>This element can contains a <code class="sgmltag-element">description</code>
element which can be used to explain the parameter's
purpose.</p><p>It is an error to define a parameter with the same name than
one of the superservice's field.
</p><div class="variablelist" title="param's attributes"><p class="title"><b><code class="sgmltag-element">param</code>'s attributes</b></p><dl><dt><span class="term">name</span></dt><dd><p>the name of the parameter.</p></dd><dt><span class="term">type</span></dt><dd><p>the parameter's data type</p></dd><dt><span class="term">default</span></dt><dd><p>the parameter's default value</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.param; (%LIRE.description;)? >
<!ATTLIST %LIRE.param;
name ID #REQUIRED
type (%lire.types;) #REQUIRED
default CDATA #IMPLIED >
</pre></div><div class="section" title="chart-configs element"><div class="titlepage"><div><div><h3 class="title"><a name="id409975"></a><code class="sgmltag-element">chart-configs</code> element</h3></div></div></div><p>This element contains one or more chart configurations that
should be copied to the generated subreport. These chart
configurations are specified using the Lire Report Configuration
Markup Language.
</p><p>This element has no attribute.</p><pre class="programlisting">
<!ELEMENT %LIRE.chart-configs; (%LRCML.param;)+ >
</pre></div><div class="section" title="Filter expression elements"><div class="titlepage"><div><div><h3 class="title"><a name="id409998"></a>Filter expression elements</h3></div></div></div><pre class="programlisting">
<!ENTITY % LIRE.eq "%LIRE.pfx;eq" >
<!ENTITY % LIRE.ne "%LIRE.pfx;ne" >
<!ENTITY % LIRE.gt "%LIRE.pfx;gt" >
<!ENTITY % LIRE.ge "%LIRE.pfx;ge" >
<!ENTITY % LIRE.lt "%LIRE.pfx;lt" >
<!ENTITY % LIRE.le "%LIRE.pfx;le" >
<!ENTITY % LIRE.and "%LIRE.pfx;and" >
<!ENTITY % LIRE.or "%LIRE.pfx;or" >
<!ENTITY % LIRE.not "%LIRE.pfx;not" >
<!ENTITY % LIRE.match "%LIRE.pfx;match" >
<!ENTITY % LIRE.value "%LIRE.pfx;value" >
<!ENTITY % expr "%LIRE.eq; | %LIRE.ne; |
%LIRE.gt; | %LIRE.lt; | %LIRE.ge; | %LIRE.le; |
%LIRE.and; | %LIRE.or; | %LIRE.not; |
%LIRE.match; | %LIRE.value;" >
</pre><div class="section" title="filter-spec element"><div class="titlepage"><div><div><h4 class="title"><a name="id410029"></a><code class="sgmltag-element">filter-spec</code> element</h4></div></div></div><p>This element is used to select the subset of the records
that will be used to generate the report. If this element is
missing, all records will be used to generate the report.</p><p>The content of this element are expression element which
defines an expression which will evaluate to true or false for
each record. The subset used for to generate the report are all
records for which the expression evaluates to true.</p><p>The value used to evaluate the expressions are either
literal, value of parameter or value of one of the field of the
record. Parameter and field starts with a $ followed by the name
of the parameter or field. All other values are interpreted as
literals.</p><p>This element doesn't have any attribute.</p><pre class="programlisting">
<!ELEMENT %LIRE.filter-spec; (%expr;) >
</pre></div><div class="section" title="value element"><div class="titlepage"><div><div><h4 class="title"><a name="id410064"></a><code class="sgmltag-element">value</code> element</h4></div></div></div><p>This expression element to false if the 'value' attribute
is undefined, the empty string or 0. It evaluate to true
otherwise.
</p><div class="variablelist" title="value's attributes"><p class="title"><b><code class="sgmltag-element">value</code>'s attributes</b></p><dl><dt><span class="term">value</span></dt><dd><p>The value that should be evaluated for a boolean
context.</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.value; EMPTY >
<!ATTLIST %LIRE.value;
value CDATA #REQUIRED >
</pre></div><div class="section" title="eq element"><div class="titlepage"><div><div><h4 class="title"><a name="id410108"></a><code class="sgmltag-element">eq</code> element</h4></div></div></div><pre class="programlisting">
<!ELEMENT %LIRE.eq; EMPTY >
<!ATTLIST %LIRE.eq;
arg1 CDATA #REQUIRED
arg2 CDATA #REQUIRED >
</pre></div><div class="section" title="ne element"><div class="titlepage"><div><div><h4 class="title"><a name="id410127"></a><code class="sgmltag-element">ne</code> element</h4></div></div></div><pre class="programlisting">
<!ELEMENT %LIRE.ne; EMPTY >
<!ATTLIST %LIRE.ne;
arg1 CDATA #REQUIRED
arg2 CDATA #REQUIRED >
</pre></div><div class="section" title="gt element"><div class="titlepage"><div><div><h4 class="title"><a name="id410146"></a><code class="sgmltag-element">gt</code> element</h4></div></div></div><pre class="programlisting">
<!ELEMENT %LIRE.gt; EMPTY >
<!ATTLIST %LIRE.gt;
arg1 CDATA #REQUIRED
arg2 CDATA #REQUIRED >
</pre></div><div class="section" title="ge element"><div class="titlepage"><div><div><h4 class="title"><a name="id410165"></a><code class="sgmltag-element">ge</code> element</h4></div></div></div><pre class="programlisting">
<!ELEMENT %LIRE.ge; EMPTY >
<!ATTLIST %LIRE.ge;
arg1 CDATA #REQUIRED
arg2 CDATA #REQUIRED >
</pre></div><div class="section" title="lt element"><div class="titlepage"><div><div><h4 class="title"><a name="id410184"></a><code class="sgmltag-element">lt</code> element</h4></div></div></div><pre class="programlisting">
<!ELEMENT %LIRE.lt; EMPTY >
<!ATTLIST %LIRE.lt;
arg1 CDATA #REQUIRED
arg2 CDATA #REQUIRED >
</pre></div><div class="section" title="le element"><div class="titlepage"><div><div><h4 class="title"><a name="id410204"></a><code class="sgmltag-element">le</code> element</h4></div></div></div><pre class="programlisting">
<!ELEMENT %LIRE.le; EMPTY >
<!ATTLIST %LIRE.le;
arg1 CDATA #REQUIRED
arg2 CDATA #REQUIRED >
</pre></div><div class="section" title="match element"><div class="titlepage"><div><div><h4 class="title"><a name="id410223"></a><code class="sgmltag-element">match</code> element</h4></div></div></div><p>The match expression element tries to match a POSIX 1003.2
extended regular expression to a value and return true if there is
a match and false otherwise.
</p><div class="variablelist" title="match's attributes"><p class="title"><b><code class="sgmltag-element">match</code>'s attributes</b></p><dl><dt><span class="term">value</span></dt><dd><p>the value which should matched</p></dd><dt><span class="term">re</span></dt><dd><p>A POSIX 1003.2 extended regular expression.</p></dd><dt><span class="term">case-sensitive</span></dt><dd><p>Is the regex sensitive to case. Defaults to true.</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.match; EMPTY >
<!ATTLIST %LIRE.match;
value CDATA #REQUIRED
re CDATA #REQUIRED
case-sensitive (%bool.type;) 'true' >
</pre></div><div class="section" title="not element"><div class="titlepage"><div><div><h4 class="title"><a name="id410295"></a><code class="sgmltag-element">not</code> element</h4></div></div></div><pre class="programlisting">
<!ELEMENT %LIRE.not; (%expr;) >
</pre></div><div class="section" title="and element"><div class="titlepage"><div><div><h4 class="title"><a name="id410310"></a><code class="sgmltag-element">and</code> element</h4></div></div></div><pre class="programlisting">
<!ELEMENT %LIRE.and; (%expr;)+ >
</pre></div><div class="section" title="or element"><div class="titlepage"><div><div><h4 class="title"><a name="id410325"></a><code class="sgmltag-element">or</code> element</h4></div></div></div><pre class="programlisting">
<!ELEMENT %LIRE.or; (%expr;)+ >
</pre></div></div><div class="section" title="Report Calculation Elements"><div class="titlepage"><div><div><h3 class="title"><a name="id410341"></a>Report Calculation Elements</h3></div></div></div><pre class="programlisting">
<!ENTITY % LIRE.timegroup "%LIRE.pfx;timegroup" >
<!ENTITY % LIRE.group "%LIRE.pfx;group" >
<!ENTITY % LIRE.rangegroup "%LIRE.pfx;rangegroup" >
<!ENTITY % LIRE.timeslot "%LIRE.pfx;timeslot" >
<!ENTITY % LIRE.field "%LIRE.pfx;field" >
<!ENTITY % LIRE.sum "%LIRE.pfx;sum" >
<!ENTITY % LIRE.avg "%LIRE.pfx;avg" >
<!ENTITY % LIRE.min "%LIRE.pfx;min" >
<!ENTITY % LIRE.max "%LIRE.pfx;max" >
<!ENTITY % LIRE.first "%LIRE.pfx;first" >
<!ENTITY % LIRE.last "%LIRE.pfx;last" >
<!ENTITY % LIRE.count "%LIRE.pfx;count" >
<!ENTITY % LIRE.records "%LIRE.pfx;records" >
<!-- Empty group operator -->
<!ENTITY % LIRE.empty-ops "%LIRE.sum; | %LIRE.avg; | %LIRE.count; |
%LIRE.min; | %LIRE.max; | %LIRE.first; |
%LIRE.last; | %LIRE.records;" >
<!-- Group operations that are also aggregators -->
<!ENTITY % LIRE.nestable-aggr
"%LIRE.group; | %LIRE.timegroup; |
%LIRE.timeslot; | %LIRE.rangegroup;" >
<!-- Group operations -->
<!ENTITY % LIRE.group-ops "%LIRE.empty-ops;| %LIRE.nestable-aggr;" >
<!-- Containers for group operations -->
<!ENTITY % LIRE.aggregator "%LIRE.nestable-aggr;" >
</pre><div class="section" title="report-calc-spec element"><div class="titlepage"><div><div><h4 class="title"><a name="id410372"></a><code class="sgmltag-element">report-calc-spec</code> element</h4></div></div></div><p>This element describes the computation needs to generate the
report.
</p><p>It contains one aggregator element.</p><p>This element doesn't have any attributes.</p><pre class="programlisting">
<!ELEMENT %LIRE.report-calc-spec; (%LIRE.aggregator;) >
</pre></div><div class="section" title="Common Attributes"><div class="titlepage"><div><div><h4 class="title"><a name="id410397"></a>Common Attributes</h4></div></div></div><p>All elements which will create a column in the resulting
report have a <span class="property">label</span> attribute that will be
used as the column label. When this attribute is omitted, the
<span class="property">name</span> attribute content will be used as
column label.
</p><pre class="programlisting">
<!ENTITY % label.attr "label CDATA #IMPLIED">
</pre><p>All operation elements may have a <span class="property">name</span>
attribute which can be used to reference that column. (It is
required in the case of aggrage functions). The primary usage is
for controlling the sort order of the rows in the generated
report.
</p><pre class="programlisting">
<!ENTITY % name.attr "name ID #IMPLIED">
<!ENTITY % name.attr.req "name ID #REQUIRED">
</pre></div><div class="section" title="group element"><div class="titlepage"><div><div><h4 class="title"><a name="id410443"></a><code class="sgmltag-element">group</code> element</h4></div></div></div><p>The group element generates a report where records are grouped
by some field values and aggregate statistics are computed on
those group of records.
</p><p>It contains the field that should be used for grouping and
the statistics that should be computed.
</p><p>The sort order in the report is controlled by the 'sort'
attribute.</p><div class="variablelist" title="group's attributes"><p class="title"><b><code class="sgmltag-element">group</code>'s attributes</b></p><dl><dt><span class="term">name</span></dt><dd><p>An identifier that can be used to reference this
operation from other elements. This name will most often be
used in the parent's <span class="property">sort</span> attribute. If
omitted a default name will be generated.
</p></dd><dt><span class="term">sort</span></dt><dd><p>whitespace delimited list of fields name that should used
to sort the records. Field names can be prefixed by
<code class="literal">-</code> to specify reverse sort order, otherwise
ascending sort order is used. The name can also refer to the
name attribute of the statistics element.
</p></dd><dt><span class="term">limit</span></dt><dd><p>limit the number of records that will be in the
generated report. It can be either a positive integer
or the name of a user supplied param.
</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.group; ((%LIRE.field;)+, (%LIRE.group-ops;)+) >
<!ATTLIST %LIRE.group;
%name.attr;
sort NMTOKENS #IMPLIED
limit CDATA #IMPLIED >
</pre></div><div class="section" title="timegroup element"><div class="titlepage"><div><div><h4 class="title"><a name="id410538"></a><code class="sgmltag-element">timegroup</code> element</h4></div></div></div><p>The timegroup<code class="sgmltag-element"></code> element generates a report
where records are grouped by time range (hour, day, etc.).
Statistics are then computed on these records grouped by period.
</p><div class="variablelist" title="timegroup's attributes"><p class="title"><b><code class="sgmltag-element">timegroup</code>'s attributes</b></p><dl><dt><span class="term">name</span></dt><dd><p>An identifier that can be used to reference this
operation from other elements. This name will most often be
used in the parent's <span class="property">sort</span> attribute. If
omitted a default name will be generated.
</p></dd><dt><span class="term">label</span></dt><dd><p>Sets the column label that will be used for column
generated by this element. If omitted a default label will be
generated.
</p></dd><dt><span class="term">field</span></dt><dd><p>the name of the field which is used to group records.
This should be a field which is of one of the time types
(<span class="type">timestamp</span>, <span class="type">date</span>,
<span class="type">time</span>). It defaults to the default
<span class="type">timestamp</span> field if unspecified.
</p></dd><dt><span class="term">period</span></dt><dd><p>This is the timeperiod over which records should be
grouped. Valid period looks like (hour, day, 1h, 30m, etc). It
can also be the name of a user supplied param.
</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.timegroup; (%LIRE.group-ops;)+ >
<!ATTLIST %LIRE.timegroup;
%name.attr;
%label.attr;
field NMTOKEN #IMPLIED
period CDATA #REQUIRED >
</pre></div><div class="section" title="timeslot element"><div class="titlepage"><div><div><h4 class="title"><a name="id410648"></a><code class="sgmltag-element">timeslot</code> element</h4></div></div></div><p>The <code class="sgmltag-element">timeslot</code> element generates a report
where records are grouped according to a cyclic unit of time. The
duration unit used won't fall over to the next higher unit. For
example, this means that using a unit of 1d will generate a
report where the stats will be by day of the week, 8h will
generate a report by third of day, etc. The statistics are then
computed over the records in the same timeslot.</p><div class="example"><a name="id410666"></a><p class="title"><b>Example 11.1. timeslot with 1d unit</b></p><div class="example-contents"><p>Using a specification like:
</p><pre class="programlisting">
<lire:timeslot unit="1d">
...
</lire:timeslot>
</pre><p>
would generate a report like:
</p><div class="table"><a name="id410681"></a><p class="title"><b>Table 11.1. weekly overview</b></p><div class="table-contents"><table summary="weekly overview" border="1"><colgroup><col><col></colgroup><tbody><tr><td>Sunday </td><td>...</td></tr><tr><td>Monday </td><td>...</td></tr><tr><td>Tuesday </td><td>...</td></tr><tr><td>... </td><td>...</td></tr><tr><td>Saturday</td><td>...</td></tr></tbody></table></div></div><p><br class="table-break">
</p><p>where data will be summed over all Sunday's, Monday's, ..., and
Saturdays found in the log.</p></div></div><br class="example-break"><div class="example"><a name="id410737"></a><p class="title"><b>Example 11.2. timeslot with 2m unit</b></p><div class="example-contents"><p>Specifying <strong class="userinput"><code>unit="2m"</code></strong> would generate
a line for each two months, giving a yearly view.</p></div></div><br class="example-break"><div class="variablelist" title="timeslot's attributes"><p class="title"><b><code class="sgmltag-element">timeslot</code>'s attributes</b></p><dl><dt><span class="term">name</span></dt><dd><p>An identifier that can be used to reference this
operation from other elements. This name will most often be
used in the parent's <span class="property">sort</span> attribute. If
omitted a default name will be generated.
</p></dd><dt><span class="term">label</span></dt><dd><p>Sets the column label that will be used for column
generated by this element. If omitted a default label will be
generated.
</p></dd><dt><span class="term">field</span></dt><dd><p>the name of the field which is used to group records.
This should be a field which is of one of the time
types (timestamp, date, time). It defaults to the
default 'timestamp' field if unspecified.
</p></dd><dt><span class="term">unit</span></dt><dd><p>This is the cyclic unit of time in which units the
records are aggregated. It can be any duration value. (hour,
day, 1h, 30m, etc). It can also be the name of a user supplied
param.
</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.timeslot; (%LIRE.group-ops;)+ >
<!ATTLIST %LIRE.timeslot;
%name.attr;
%label.attr;
field NMTOKEN #IMPLIED
unit CDATA #REQUIRED >
</pre></div><div class="section" title="rangroup element"><div class="titlepage"><div><div><h4 class="title"><a name="id410836"></a><code class="sgmltag-element">rangroup</code> element</h4></div></div></div><p>The <code class="sgmltag-element">rangegroup</code> element generates a report
where records are grouped into distinct class delimited by a
range. This element can be used to aggregates continuous numeric
values like duration or bytes. Statistics are then computed on
these records grouped in range class.
</p><div class="variablelist" title="rangegroup's attributes"><p class="title"><b><code class="sgmltag-element">rangegroup</code>'s attributes</b></p><dl><dt><span class="term">name</span></dt><dd><p>An identifier that can be used to reference this
operation from other elements. This name will most often be
used in the parent's <span class="property">sort</span> attribute. If
omitted a default name will be generated.
</p></dd><dt><span class="term">label</span></dt><dd><p>Sets the column label that will be used for column
generated by this element. If omitted a default label will be
generated.
</p></dd><dt><span class="term">field</span></dt><dd><p>the name of the field which is used to group records.
This should be a field which is of a continuous numeric type
(bytes, duration, int, number). Time types aggregation should
use the timegroup element or timeslot.
</p></dd><dt><span class="term">range-start</span></dt><dd><p>The starting index of the first class. Defaults to 0.
This won't be used a the lower limit of the class. It is only
used to specify relatively at which values the classes
delimitation start. For example, if the range-start is 1, and
the range-size is 5, a class ranging -4 to 0 will be created
if values are in that range. It can be supplied in any
continuous unit (i.e 10k, 5m, etc.) This can also be the name
of a user supplied param.
</p></dd><dt><span class="term">range-size</span></dt><dd><p>This is the size of class. It can be supplied in any
continuous unit (i.e 10k, 5m, etc.) It can also be the name of
a user supplied param.
</p></dd><dt><span class="term">min-value</span></dt><dd><p>All value lower then this boundary value will be
considered to be equal to this value. If this parameter isn't
set, the ranges won't be bounded on the left side.
</p></dd><dt><span class="term">max-value</span></dt><dd><p>All value greater then this boundary value will be
considered to be equal to this value. If this parameter isn't
set, the ranges won't be bounded on the right side.</p></dd><dt><span class="term">size-scale</span></dt><dd><p>The rate at which the size scale from one class to
another. If it is different then 1, this will create a
logarithmic distribution. For example, setting this to 2, each
successive class will be twice larger then the precedent :
0-9, 10-29, 30-69, etc.
</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.rangegroup; (%LIRE.group-ops;)+ >
<!ATTLIST %LIRE.rangegroup;
%name.attr;
%label.attr;
field NMTOKEN #REQUIRED
range-start CDATA #IMPLIED
range-size CDATA #REQUIRED
min-value CDATA #IMPLIED
max-value CDATA #IMPLIED
size-scale CDATA #IMPLIED >
</pre></div><div class="section" title="field element"><div class="titlepage"><div><div><h4 class="title"><a name="id411005"></a><code class="sgmltag-element">field</code> element</h4></div></div></div><p>This element reference a DLF field which value will be
displayed in a separate column in the resulting report. Its used
to specify the grouping fields in the <code class="sgmltag-element">group</code>
element and to specify the fields to output in the
<code class="sgmltag-element">records</code> element.
</p><div class="variablelist" title="field's attribute"><p class="title"><b><code class="sgmltag-element">field</code>'s attribute</b></p><dl><dt><span class="term">name</span></dt><dd><p>The name of the DLF field that will be used as key for
grouping.</p></dd><dt><span class="term">label</span></dt><dd><p>Sets the column label that will be used for column
generated by this element. If omitted a default label will be
generated.
</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.field; EMPTY >
<!ATTLIST %LIRE.field;
name NMTOKEN #REQUIRED
%label.attr; >
</pre></div><div class="section" title="sum element"><div class="titlepage"><div><div><h4 class="title"><a name="id411071"></a><code class="sgmltag-element">sum</code> element</h4></div></div></div><p>The <code class="sgmltag-element">sum</code> element sums the value of a field
in the group.
</p><div class="variablelist" title="sum's attributes"><p class="title"><b><code class="sgmltag-element">sum</code>'s attributes</b></p><dl><dt><span class="term">name</span></dt><dd><p>An identifier that can be used to reference this
operation from other elements. This name will most often be
used in the parent's <span class="property">sort</span> attribute.
</p></dd><dt><span class="term">label</span></dt><dd><p>Sets the column label that will be used for column
generated by this element. If omitted a default label will be
generated.
</p></dd><dt><span class="term">field</span></dt><dd><p>the field that should be summed.</p></dd><dt><span class="term">ratio</span></dt><dd><p>This attribute can be used to display the sum as a ratio
of the group or table total. If the attribute is set to
<code class="constant">group</code> the resulting value will be the
ratio on the group's total sum. If the attribute is set to
<code class="constant">table</code>, it will be expressed as a ratio of
the total sum of the table. The defaults is
<code class="constant">none</code> which will not convert the sum to a
ratio.
</p></dd><dt><span class="term">weight</span></dt><dd><p>This optional attribute can be used to create a weighted
sum. It should contain a numerical DLF field name. The content
of that field will be used to multiply each
<span class="property">field</span> value before summing them.
</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.sum; EMPTY >
<!ATTLIST %LIRE.sum;
%name.attr.req;
%label.attr;
ratio (none | group |table) 'none'
field NMTOKEN #REQUIRED
weight NMTOKEN #IMPLIED >
</pre></div><div class="section" title="avg element"><div class="titlepage"><div><div><h4 class="title"><a name="id411197"></a><code class="sgmltag-element">avg</code> element</h4></div></div></div><p>The avg<code class="sgmltag-element"></code> element calculate average of all
value of a field in the group. The average will be computed
either on the number of records if the
<span class="property">by-field</span> attribute is left empty, or by the
number of different values that there are in the
<span class="property">by-fields</span>.
</p><div class="variablelist" title="avg's attributes"><p class="title"><b><code class="sgmltag-element">avg</code>'s attributes</b></p><dl><dt><span class="term">name</span></dt><dd><p>An identifier that can be used to reference this
operation from other elements. This name will most often be
used in the parent's <span class="property">sort</span> attribute.
</p></dd><dt><span class="term">label</span></dt><dd><p>Sets the column label that will be used for column
generated by this element. If omitted a default label will be
generated.
</p></dd><dt><span class="term">field</span></dt><dd><p>the field that should be averaged. If left unspecified
the number of record will be counted.
</p></dd><dt><span class="term">by-fields</span></dt><dd><p>the fields that will be used to dermine the count over
which the average is computed.
</p></dd><dt><span class="term">weight</span></dt><dd><p>This optional attribute can be used to create a weighted
average. It should contain a numerical DLF field name. The
content of that field will be used to multiply each
<span class="property">field</span> value before summing them. Its that
weighted sum that will be used to calculate the average.
</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.avg; EMPTY >
<!ATTLIST %LIRE.avg;
%name.attr.req;
%label.attr;
field NMTOKEN #IMPLIED
by-fields NMTOKENS #IMPLIED
weight NMTOKEN #IMPLIED >
</pre></div><div class="section" title="max element"><div class="titlepage"><div><div><h4 class="title"><a name="id411325"></a><code class="sgmltag-element">max</code> element</h4></div></div></div><p>The max<code class="sgmltag-element"></code> element calculates the maximum
value for a field in all the group's records.
</p><div class="variablelist" title="max's attributes"><p class="title"><b><code class="sgmltag-element">max</code>'s attributes</b></p><dl><dt><span class="term">name</span></dt><dd><p>An identifier that can be used to reference this
operation from other elements. This name will most often be
used in the parent's <span class="property">sort</span> attribute.
</p></dd><dt><span class="term">label</span></dt><dd><p>Sets the column label that will be used for column
generated by this element. If omitted a default label will be
generated.
</p></dd><dt><span class="term">field</span></dt><dd><p>the field for which the maximum value should found.</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.max; EMPTY >
<!ATTLIST %LIRE.max;
%name.attr.req;
%label.attr;
field NMTOKEN #REQUIRED >
</pre></div><div class="section" title="min element"><div class="titlepage"><div><div><h4 class="title"><a name="id411404"></a><code class="sgmltag-element">min</code> element</h4></div></div></div><p>The <code class="sgmltag-element">min</code> element calculates the minimum
value for a field in all the group's records.
</p><div class="variablelist" title="min's attributes"><p class="title"><b><code class="sgmltag-element">min</code>'s attributes</b></p><dl><dt><span class="term">name</span></dt><dd><p>An identifier that can be used to reference this
operation from other elements. This name will most often be
used in the parent's <span class="property">sort</span> attribute.
</p></dd><dt><span class="term">label</span></dt><dd><p>Sets the column label that will be used for column
generated by this element. If omitted a default label will be
generated.
</p></dd><dt><span class="term">field</span></dt><dd><p>the field for which the minimum value should
found.
</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.min; EMPTY >
<!ATTLIST %LIRE.min;
%name.attr.req;
%label.attr;
field NMTOKEN #REQUIRED >
</pre></div><div class="section" title="first element"><div class="titlepage"><div><div><h4 class="title"><a name="id411486"></a><code class="sgmltag-element">first</code> element</h4></div></div></div><p>The <code class="sgmltag-element">first</code> element will display the value
of the value of one field of the first DLF record within its
group. The sort order is controlled through the
<span class="property">sort</span> attribute..
</p><div class="variablelist" title="first's attributes"><p class="title"><b><code class="sgmltag-element">first</code>'s attributes</b></p><dl><dt><span class="term">name</span></dt><dd><p>An identifier that can be used to reference this
operation from other elements. This name will most often be
used in the parent's <span class="property">sort</span> attribute.
</p></dd><dt><span class="term">label</span></dt><dd><p>Sets the column label that will be used for column
generated by this element. If omitted a default label will be
generated.
</p></dd><dt><span class="term">field</span></dt><dd><p>the DLF field which will be displayed.
</p></dd><dt><span class="term">sort</span></dt><dd><p>whitespace delimited list of fields name that should used
to sort the records. Field names can be prefixed by
<code class="literal">-</code> to specify reverse sort order, otherwise
ascending sort order is used. If this attribute is omitted,
the records will be sort in ascending order of the default
<span class="type">timestamp</span> field.
</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.first; EMPTY >
<!ATTLIST %LIRE.first;
%name.attr.req;
%label.attr;
field NMTOKEN #REQUIRED
sort NMTOKENS #IMPLIED
>
</pre></div><div class="section" title="last element"><div class="titlepage"><div><div><h4 class="title"><a name="id411597"></a><code class="sgmltag-element">last</code> element</h4></div></div></div><p>The <code class="sgmltag-element">last</code> element will display the value
of the value of one field of the last DLF record within its
group. The sort order is controlled through the
<span class="property">sort</span> attribute..
</p><div class="variablelist" title="last's attributes"><p class="title"><b><code class="sgmltag-element">last</code>'s attributes</b></p><dl><dt><span class="term">name</span></dt><dd><p>An identifier that can be used to reference this
operation from other elements. This name will most often be
used in the parent's <span class="property">sort</span> attribute.
</p></dd><dt><span class="term">label</span></dt><dd><p>Sets the column label that will be used for column
generated by this element. If omitted a default label will be
generated.
</p></dd><dt><span class="term">field</span></dt><dd><p>the DLF field which will be displayed.
</p></dd><dt><span class="term">sort</span></dt><dd><p>whitespace delimited list of fields name that should used
to sort the records. Field names can be prefixed by
<code class="literal">-</code> to specify reverse sort order, otherwise
ascending sort order is used. If this attribute is omitted,
the records will be sort in ascending order of the default
<span class="type">timestamp</span> field.
</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.last; EMPTY >
<!ATTLIST %LIRE.last;
%name.attr.req;
%label.attr;
field NMTOKEN #REQUIRED
sort NMTOKENS #IMPLIED
>
</pre></div><div class="section" title="count element"><div class="titlepage"><div><div><h4 class="title"><a name="id411708"></a><code class="sgmltag-element">count</code> element</h4></div></div></div><p>The <code class="sgmltag-element">count</code> element counts the number of
records in the group if the <span class="property">fields</span> attribute
is left empty. Otherwise, it will count the number of different
values in the fields specified.
</p><div class="variablelist" title="count's attributes"><p class="title"><b><code class="sgmltag-element">count</code>'s attributes</b></p><dl><dt><span class="term">name</span></dt><dd><p>An identifier that can be used to reference this
operation from other elements. This name will most often be
used in the parent's <span class="property">sort</span> attribute.
</p></dd><dt><span class="term">label</span></dt><dd><p>Sets the column label that will be used for column
generated by this element. If omitted a default label will be
generated.
</p></dd><dt><span class="term">fields</span></dt><dd><p>Which fields to count. If unspecified all records in the
group are counted. If not, only different fields' value will
be counted.
</p></dd><dt><span class="term">ratio</span></dt><dd><p>This attribute can be used to display the frequency as a
ratio of the group or table total. If the attribute is set to
<code class="constant">group</code> the resulting value will be the
ratio on the group's total frequency. If the attribute is set
to <code class="constant">table</code>, it will be expressed as a
ratio of the total frequency of the table. The defaults is
<code class="constant">none</code> which will not convert the frequency
to a ratio.
</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.count; EMPTY >
<!ATTLIST %LIRE.count;
%name.attr.req;
%label.attr;
ratio (none | group |table) 'none'
fields NMTOKENS #IMPLIED >
</pre></div><div class="section" title="records element"><div class="titlepage"><div><div><h4 class="title"><a name="id411824"></a><code class="sgmltag-element">records</code> element</h4></div></div></div><p>The <code class="sgmltag-element">records</code> element will put the content
of selected fields in the report. This can be used in reports
that shows events matching certain criteria. The fields that will
be included in the report for each record is specified by the
<code class="sgmltag-element">field</code> element.
</p><div class="variablelist" title="records's attribute"><p class="title"><b><code class="sgmltag-element">records</code>'s attribute</b></p><dl><dt><span class="term">fields</span></dt><dd><p>whitespace delimited list of fields name that should
included in the report.
</p></dd></dl></div><pre class="programlisting">
<!ELEMENT %LIRE.records; EMPTY >
<!ATTLIST %LIRE.records;
fields NMTOKENS #REQUIRED >
</pre></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch10.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="ch12.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 10. The Lire DLF Schema 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 12. The Lire Report Markup Language</td></tr></table></div></body></html>
|