<?xml version="1.0" encoding="US-ASCII"?>

<!--
Copyright (C) 2001,2002 Stichting LogReport Foundation LogReport@LogReport.org
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
     
You should have received a copy of the GNU General Public License
along with this program (see COPYING); if not, check with
http://www.gnu.org/copyleft/gpl.html. 

-->
  
  

<!--                    
                                                                   -->

<!--                    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 % 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 V1.0//EN"
    "lire-desc-1.0.mod">
%lire-desc.mod;
   
  

<!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.filter-spec     "%LIRE.pfx;filter-spec"              >
<!ENTITY % LIRE.report-calc-spec "%LIRE.pfx;report-calc-spec"        >
<!ENTITY % LIRE.extension       "%LIRE.pfx;extension"                >

  

<!ELEMENT %LIRE.report-spec;
                        (%LIRE.title;, %LIRE.description;,
                         (%LIRE.param-spec;)?, %LIRE.display-spec;,
                        (%LIRE.filter-spec;)?, 
                        (%LIRE.report-calc-spec;|%LIRE.extension;))    
                                                                     >
<!ATTLIST %LIRE.report-spec;
             id             ID                              #REQUIRED
             superservice   %superservice.type;             #REQUIRED
             schema         NMTOKEN                         #IMPLIED
             charttype      (%chart.type;)                  #IMPLIED
             %LIRE.xmlns.attr;                                       >

   

<!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
             %LIRE.xmlns.attr;                                       >

   

<!ELEMENT %LIRE.display-spec; (%LIRE.title;, (%LIRE.description;)*)  >

   

<!ELEMENT %LIRE.param-spec; (%LIRE.param;)+                          >

   

<!ELEMENT %LIRE.param; (%LIRE.description;)?                         >
<!ATTLIST  %LIRE.param;
             name       ID                                 #REQUIRED 
             type       (%lire.types;)                     #REQUIRED
             default    CDATA                              #IMPLIED  >

   

<!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;"                        >

   
 
<!ELEMENT %LIRE.filter-spec; (%expr;)                                >

    

<!ELEMENT %LIRE.value;  EMPTY                                        >
<!ATTLIST %LIRE.value;
             value      CDATA                              #REQUIRED >

    

<!ELEMENT %LIRE.eq;     EMPTY                                        >
<!ATTLIST %LIRE.eq;
             arg1       CDATA                              #REQUIRED   
             arg2       CDATA                              #REQUIRED >

    

<!ELEMENT %LIRE.ne;     EMPTY                                        >
<!ATTLIST %LIRE.ne;
             arg1       CDATA                              #REQUIRED   
             arg2       CDATA                              #REQUIRED >

    

<!ELEMENT %LIRE.gt;     EMPTY                                        >
<!ATTLIST %LIRE.gt;
             arg1       CDATA                              #REQUIRED   
             arg2       CDATA                              #REQUIRED >

    

<!ELEMENT %LIRE.ge;     EMPTY                                        >
<!ATTLIST %LIRE.ge;
             arg1       CDATA                              #REQUIRED   
             arg2       CDATA                              #REQUIRED >

    

<!ELEMENT %LIRE.lt;     EMPTY                                        >
<!ATTLIST %LIRE.lt;
             arg1       CDATA                              #REQUIRED   
             arg2       CDATA                              #REQUIRED >

    

<!ELEMENT %LIRE.le;     EMPTY                                        >
<!ATTLIST %LIRE.le;
             arg1       CDATA                              #REQUIRED   
             arg2       CDATA                              #REQUIRED >

    

<!ELEMENT %LIRE.match;  EMPTY                                        >
<!ATTLIST %LIRE.match;
             value          CDATA                          #REQUIRED   
             re             CDATA                          #REQUIRED 
             case-sensitive (%bool.type;)                  'true'    >

    

<!ELEMENT %LIRE.not;    (%expr;)                                     >

    

<!ELEMENT %LIRE.and;    (%expr;)+                                    >

    

<!ELEMENT %LIRE.or;     (%expr;)+                                    >

    

<!--
    This parameter entity may be used by extensions to define
    additional attributes that can be used to parametrize the 
    extension.
                                                                   -->
<!ENTITY % LIRE.extension.optional.attr ""                           >
<!ELEMENT %LIRE.extension; EMPTY                                     >

<!ATTLIST %LIRE.extension;
             name       NMTOKEN                            #REQUIRED 
             %LIRE.extension.optional.attr;                          >


   

<!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.summary     "%LIRE.pfx;summary"                      >
<!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.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.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; | %LIRE.summary;"  >

   

<!ELEMENT %LIRE.report-calc-spec; (%LIRE.aggregator;)                >

    
 
<!ELEMENT %LIRE.summary;          (%LIRE.group-ops;)+                >

    

<!ELEMENT %LIRE.group;      ((%LIRE.field;)+, (%LIRE.group-ops;)+)   >
<!ATTLIST %LIRE.group;
             sort       NMTOKENS                           #IMPLIED  
             name       ID                                 #IMPLIED
             limit      CDATA                              #IMPLIED  >

    

<!ELEMENT %LIRE.timegroup;  (%LIRE.group-ops;)+                      >
<!ATTLIST %LIRE.timegroup;
             field      NMTOKEN                            #IMPLIED
             period     CDATA                             #REQUIRED  >

    

<!ELEMENT %LIRE.timeslot;  (%LIRE.group-ops;)+                       >
<!ATTLIST %LIRE.timeslot;
             field      NMTOKEN                            #IMPLIED
             unit       CDATA                             #REQUIRED  >

    

<!ELEMENT %LIRE.rangegroup;  (%LIRE.group-ops;)+                     >
<!ATTLIST %LIRE.rangegroup;
             field          NMTOKEN                       #REQUIRED
             range-start    CDATA                         #IMPLIED
             range-size     CDATA                         #REQUIRED 
             min-value      CDATA                         #IMPLIED   
             max-value      CDATA                         #IMPLIED 
             size-scale     CDATA                         #IMPLIED   >

    

<!ELEMENT %LIRE.field;  EMPTY                                        >
<!ATTLIST %LIRE.field;
             name       NMTOKEN                            #REQUIRED >

    

<!ELEMENT %LIRE.sum;    EMPTY                                        >
<!ATTLIST %LIRE.sum;
             name       ID                                 #REQUIRED 
             field      NMTOKEN                            #REQUIRED >

    
 
<!ELEMENT %LIRE.avg;    EMPTY                                        >
<!ATTLIST %LIRE.avg;
             name       ID                                 #REQUIRED 
             field      NMTOKEN                            #IMPLIED 
             by-fields  NMTOKENS                           #IMPLIED  >

    
 
<!ELEMENT %LIRE.max;    EMPTY                                        >
<!ATTLIST %LIRE.max;
             name       ID                                 #REQUIRED 
             field      NMTOKEN                            #REQUIRED >

    
 
<!ELEMENT %LIRE.min;    EMPTY                                        >
<!ATTLIST %LIRE.min;
             name       ID                                 #REQUIRED 
             field      NMTOKEN                            #REQUIRED >

    

<!ELEMENT %LIRE.count;  EMPTY                                        >
<!ATTLIST %LIRE.count;
             name       ID                                 #REQUIRED 
             fields     NMTOKENS                           #IMPLIED  >

    

<!ELEMENT %LIRE.records; EMPTY                                       >
<!ATTLIST %LIRE.records;
             fields      NMTOKENS                          #REQUIRED >


    
