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

<!--
Copyright (C) 2001-2004 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/LRML/'">

<!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/'">

  
 
<!-- Include needed modules -->
<!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 V3.0//EN"
    "lire-desc.mod">
%lire-desc.mod;

  

<!--                    Parameter entities which defines qualified
                        names of the elements                      -->
<!ENTITY % LIRE.report          "%LIRE.pfx;report"                   >
<!ENTITY % LIRE.section         "%LIRE.pfx;section"                  >
<!ENTITY % LIRE.subreport       "%LIRE.pfx;subreport"                >
<!ENTITY % LIRE.missing-subreport "%LIRE.pfx;missing-subreport"      >
<!ENTITY % LIRE.table           "%LIRE.pfx;table"                    >
<!ENTITY % LIRE.table-info	"%LIRE.pfx;table-info"               >
<!ENTITY % LIRE.group-info	"%LIRE.pfx;group-info"               >
<!ENTITY % LIRE.column-info	"%LIRE.pfx;column-info"              >
<!ENTITY % LIRE.group-summary   "%LIRE.pfx;group-summary"            >
<!ENTITY % LIRE.entry           "%LIRE.pfx;entry"                    >
<!ENTITY % LIRE.group           "%LIRE.pfx;group"                    >
<!ENTITY % LIRE.name            "%LIRE.pfx;name"                     >
<!ENTITY % LIRE.value           "%LIRE.pfx;value"                    >
<!ENTITY % LIRE.date            "%LIRE.pfx;date"                     >
<!ENTITY % LIRE.timespan        "%LIRE.pfx;timespan"                 >
<!ENTITY % LIRE.chart-configs   "%LIRE.pfx;chart-configs"            >
<!ENTITY % LRCML.param          "%LRCML.pfx;param"                   >

<!ELEMENT %LRCML.param; (#PCDATA|%LRCML.param;)*                       >
<!ATTLIST %LRCML.param;
             name      NMTOKEN                             #REQUIRED
             value     CDATA                               #IMPLIED >

  

<!ELEMENT %LIRE.report;      ((%LIRE.title;)?, (%LIRE.date;)?, 
                              (%LIRE.timespan;)?, (%LIRE.description;)?, 
                              (%LIRE.section;)+)                     >
<!ATTLIST %LIRE.report; 
             version         %number.type;                 #REQUIRED
             %LIRE.xmlns.attr;                                       
             %LRCML.xmlns.attr;                                       >

   
 
<!ELEMENT %LIRE.date;    (#PCDATA)                                   >
<!ATTLIST %LIRE.date;
             time        %number.type;                      #REQUIRED>
 
     

<!ELEMENT %LIRE.timespan;    (#PCDATA)                               >
<!ATTLIST %LIRE.timespan;
          period        (hourly|daily|weekly|monthly|yearly) #IMPLIED
          start         %number.type;                    #REQUIRED
          end           %number.type;                    #REQUIRED   >


    


                      
<!ELEMENT %LIRE.section;      ( %LIRE.title;, (%LIRE.description;)?, 
			       (%LIRE.subreport;|%LIRE.missing-subreport;)*) >

   

<!ELEMENT %LIRE.subreport;    ( %LIRE.title;, (%LIRE.description;)?, 
                                %LIRE.table;, (%LIRE.chart-configs;)?) >
<!ATTLIST %LIRE.subreport;
	     id		    ID				    #REQUIRED
             superservice   %superservice.type;             #REQUIRED
             type           CDATA                           #REQUIRED
             schemas        NMTOKENS                        #REQUIRED >

   

<!ELEMENT %LIRE.missing-subreport; (EMPTY)                           >
<!ATTLIST %LIRE.missing-subreport;
	     id		    ID				    #IMPLIED
             superservice   %superservice.type;            #REQUIRED
             reason         CDATA                          #IMPLIED
             type           CDATA                          #REQUIRED
             schemas        NMTOKENS                       #REQUIRED >

   

<!ELEMENT %LIRE.table;        (%LIRE.table-info;, %LIRE.group-summary;,
			       (%LIRE.entry;)*) >
<!ATTLIST %LIRE.table;
              show         %int.type;                        #IMPLIED >

   

<!ELEMENT %LIRE.table-info;   (%LIRE.column-info;|%LIRE.group-info;)+ >

   

<!ELEMENT %LIRE.group-info;   (%LIRE.column-info;|%LIRE.group-info;)+ >
<!ATTLIST %LIRE.group-info;
	     name     NMTOKEN			           #REQUIRED 
	     row-idx  %int.type;			   #REQUIRED >

   

<!ELEMENT %LIRE.column-info;        EMPTY                        >
<!ATTLIST %LIRE.column-info;
             name	   NMTOKEN			#REQUIRED
	     class	   (categorical|numerical)	#REQUIRED
	     type	   (%lire.types;)		#REQUIRED
             label         CDATA                        #IMPLIED 
             col-start     %int.type;                   #REQUIRED
             col-end       %int.type;                   #REQUIRED
             col-width     %int.type;                   #IMPLIED 
             max-chars     %int.type;                   #IMPLIED 
             avg-chars     %int.type;                   #IMPLIED >

   

<!ELEMENT %LIRE.group-summary; (%LIRE.value;)*                       >
<!ATTLIST %LIRE.group-summary;
             nrecords         %int.type;                   #REQUIRED 
             missing-cases    %int.type;                    #IMPLIED 
	     row-idx	      %int.type;		    #IMPLIED >

   

<!ELEMENT %LIRE.group;        (%LIRE.group-summary;, (%LIRE.entry;)*)>
<!ATTLIST %LIRE.group;
	     id		  ID				    #IMPLIED
             show         %int.type;                        #IMPLIED >

   

<!--
                                                                   -->
<!ELEMENT %LIRE.entry;        (%LIRE.name;, 
				(%LIRE.name;|%LIRE.value;|%LIRE.group;)+)>
<!ATTLIST %LIRE.entry;
	     id		  ID				    #IMPLIED 
	     row-idx	  %int.type;			    #IMPLIED >


   

<!ELEMENT %LIRE.name;         (#PCDATA)                              >
<!ATTLIST %LIRE.name;
	     id		      ID			    #IMPLIED
	     col	      NMTOKEN			    #REQUIRED
             value            CDATA                         #IMPLIED
             range            %number.type;                 #IMPLIED >

   

<!ELEMENT %LIRE.value;        (#PCDATA)                              >
<!ATTLIST %LIRE.value;
	     id	         ID				    #IMPLIED
	     col	 NMTOKEN	    		    #REQUIRED
	     missing-cases %int.type;			    #IMPLIED
             value       %number.type;                      #IMPLIED 
             total       %number.type;                      #IMPLIED 
             n           %number.type;                      #IMPLIED >

   

<!ELEMENT %LIRE.chart-configs; (%LRCML.param;)+                      >

   