| The report, as a kind of effective means of the information organization, is one of the important components of the E-government and E-commerce system. With the wide application of the Internet technology, the E-government and E-commerce have developed deeply. The traditional applications under the C/S structure are shifting to the web step by step. More and more applications about the report under the C/S structure will be developed and run under the web environment. But the simple problems about the report under the C/S structure became the bottleneck in the B/S structure. Because it can only use the browser as the user's interface to interact with the users, it can't control the output results accurately. And a lot of web applications often need very complicated functions in the report designing and outputting, it can't generally satisfy the outputting demand only by the function the browser or HTML page provide. According to some business demand about the report in the procedure of the E-government applications developed, the paper presents a kind of engine based on the vocabulary about the web report. It introduces the design and implementation of the engine in detail, and describes emphatically four respects of the engine: the Vocabulary, the Data Extracting, the Template Design, the Template Parsing and Export. Among them, the Template Parsing and Export is the focus of this paper. The vocabularies are the foundation and core of the engine. The design and implementation of the engine are all around them. The vocabularies have defined a large number of report elements and divided the structure of the report into six major parts: the report header, the report footer, the page header, the page footer, the group list and the main body. This paper involves four vocabularies: the Data Source Vocabulary, the Data Vocabulary, the Design Vocabulary and the Export Vocabulary. The Data Source Vocabulary defines the structure and the organization rules of the data source template. The Data Vocabulary defines the structure and the organization rules of the data template. The Design Vocabulary defines the structure and the organization rules of the design template. The Export Vocabulary defines the structure and the organization rules of the export template. DTD is used to describe and define the vocabularies. Java is used as the developing language of the engine. The advantage of Java is not fixed on some specific platform. It can use the same codes on Windows, Unix, Linux and other platforms; And Java is often one of the choices used to deal with the XML applications, especially for all kinds of processors about XML. XML has many advantages such as self-description, extensibility, and platform independence, etc. So it has been extensively and flexibly applied in the related fields such as data publishing, data exchanging, data storing and data searching etc. XML has already become the standard of data interchange on the web application now. The final outputting format with report uses PDF or HTML. PDF is the ideal file format that stores the electronic file and the digitized information on Internet and it has become an industrial standard of the digitized information. PDF is not fixed on some specific platform, so it can be read and output in the different platforms without the platform consistency. HTML is the most widely used format on Internet. Data processing uses the tactics that read once and used many times. It analyzes the data source template at first, obtains the information of the data source and reads the data, then stores these data in the data template of XML. In XML, the representations of the data are all same (though they may come from the different data sources). The variables in the design template only access the data template while obtaining the data. They can obtain the data coming from the different data sources only in a way obtaining the result about the data source: data read once and used many... |