Login | Register
My pages Projects Community openCollabNet

DTDs used by eReport

There are two dtds used by eReport. One defines the layout of the Excel Spreadsheet and its relationship to a database or multiple databases. The other dtd allows you to use parameters in your sql statements and other locations throughout the file.

TOEXCEL.dtd

The main dtd used by eReport to create or edit Excel spreadsheets.

<?xml version='1.0' encoding='UTF-8'?>

<!--
    Typical usage:

    <?xml version="1.0"?>

    <!DOCTYPE TOEXCEL SYSTEM "TOEXCEL.dtd">

    <TOEXCEL>
    ...
    </TOEXCEL>
-->

<!ELEMENT BORDER EMPTY>
<!ATTLIST BORDER
    Right CDATA #IMPLIED
    Bottom CDATA #IMPLIED
    Left CDATA #IMPLIED
    Top CDATA #IMPLIED
    Color CDATA #IMPLIED
  >

<!ELEMENT COLUMN (FONT|BORDER|VALUE)*>
<!ATTLIST COLUMN
    id CDATA #IMPLIED
    Width CDATA #IMPLIED
    Align CDATA #IMPLIED
    Heading CDATA #IMPLIED
    DataFormat CDATA #IMPLIED
    BgColor CDATA #IMPLIED
  >

<!ELEMENT DB (DB_URL|DB_PASSWORD|DB_USER|DB_DRIVER|DB_PATH)*>
<!ATTLIST DB 
	id CDATA #IMPLIED
	>

<!ELEMENT DB_DRIVER (#PCDATA)>
<!ATTLIST DB_DRIVER
	Type CDATA #IMPLIED
	>

<!ELEMENT DB_PASSWORD (#PCDATA)>
<!ATTLIST DB_PASSWORD
	Type CDATA #IMPLIED
	>

<!ELEMENT DB_PATH (#PCDATA)>
<!ATTLIST DB_PATH
	Type CDATA #IMPLIED
	>

<!ELEMENT DB_URL (#PCDATA)>
<!ATTLIST DB_URL
	Type CDATA #IMPLIED
	>

<!ELEMENT DB_USER (#PCDATA)>
<!ATTLIST DB_USER
	Type CDATA #IMPLIED
	>

<!ELEMENT FONT EMPTY>
<!ATTLIST FONT
    Offsettype CDATA #IMPLIED
    Underline CDATA #IMPLIED
    Strikeout CDATA #IMPLIED
    Name CDATA #IMPLIED
    Weight CDATA #IMPLIED
    Color CDATA #IMPLIED
    Size CDATA #IMPLIED
  >

<!ELEMENT FOOTER (FOOTER_LEFT|FOOTER_CENTER|FOOTER_RIGHT)*>
<!ATTLIST FOOTER
	id CDATA #IMPLIED
	>

<!ELEMENT FOOTER_CENTER (#PCDATA)>
<!ATTLIST FOOTER_CENTER
 	Type CDATA #IMPLIED
 	>

<!ELEMENT FOOTER_LEFT (#PCDATA)>
<!ATTLIST FOOTER_LEFT
	Type CDATA #IMPLIED
	>

<!ELEMENT FOOTER_RIGHT (#PCDATA)>
<!ATTLIST FOOTER_RIGHT
	Type CDATA #IMPLIED
	>

<!ELEMENT HEADER (HEADER_RIGHT|HEADER_LEFT|HEADER_CENTER)*>
<!ATTLIST HEADER
	id CDATA #IMPLIED
	>

<!ELEMENT HEADER_CENTER (#PCDATA)>
<!ATTLIST HEADER_CENTER 
	Type CDATA #IMPLIED
	>

<!ELEMENT HEADER_LEFT (#PCDATA)>
<!ATTLIST HEADER_LEFT
	Type CDATA #IMPLIED
	>

<!ELEMENT HEADER_RIGHT (#PCDATA)>
<!ATTLIST HEADER_RIGHT
	Type CDATA #IMPLIED
	>

<!ELEMENT RESULTSET (SQL|COLUMN)*>
<!ATTLIST RESULTSET
	Exists CDATA #IMPLIED
	id 		CDATA #IMPLIED
	Height CDATA #IMPLIED
	>

<!ELEMENT ROW (COLUMN)*>
<!ATTLIST ROW
    Exists CDATA #IMPLIED
    id 		CDATA #IMPLIED
    Height CDATA #IMPLIED
>

<!ELEMENT SHEET (HEADER|FOOTER|ROW|RESULTSET|DB)*>
<!ATTLIST SHEET
    Name CDATA #IMPLIED
    Exists CDATA #IMPLIED
    Crop CDATA #IMPLIED    
  >

<!ELEMENT SQL (#PCDATA)>
<!ATTLIST SQL
	IsPreparedStmt CDATA #IMPLIED
	id	CDATA #IMPLIED
>

<!ELEMENT TOEXCEL (DB|WORKBOOK)*>

<!ELEMENT VALUE (#PCDATA)>
<!ATTLIST VALUE
    Type CDATA #IMPLIED
  >

<!ELEMENT WORKBOOK (SHEET|DB)*>
<!ATTLIST WORKBOOK
    Name CDATA #IMPLIED
    Exists CDATA #IMPLIED
    ParamFile CDATA #IMPLIED
  >


TOEXCELParameters.dtd

This file defines the xml file that we use to hold parameters if you are using parameterized SQL statements or parameters anywhere else throughout the report definition file.


<?xml version='1.0' encoding='UTF-8'?>
<!ELEMENT TOEXCELPARAMS (PARAMETERS)*>

<!ELEMENT PARAM (#PCDATA)>
<!ATTLIST PARAM
    id CDATA #IMPLIED
   >
<!ELEMENT PARAMETERS (PARAM)*>
<!ATTLIST PARAMETERS
	id CDATA #IMPLIED
	>

Below is an example of a SQL query that uses parameters and an example paramaters.xml that would allow you to insert the actual values into your SQL. For uses of parameters in other locations check the example file earlier in this document.

EXAMPLE SQL Element from a RESULTSET ELEMENT


 <SQL IsPreparedStmt="true" id="rs1">select SUPP_NO, SUPP_NAME,? from SUPPDETAILS
        		 order by ? DESC</SQL>

and the params.xml file that goes with it.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE TOEXCEL SYSTEM "TOEXCELPARAMS.dtd">
<TOEXCELPARAMS>
	<PARAMETERS id="rs1">
		<PARAM id="0">SUPP_YTD_PURCH</PARAM>
		<PARAM id="1">SUPP_YTD_PURCH</PARAM>
	</PARAMETERS>
	
</TOEXCELPARAMS>