IBIS-Q System Documentation - Create Query Module FilesCreating a Query ModuleThis page describes how to create the Interface XML files. An additional page describes how to create the back-end files. Both the Interface XML files and the back-end files files are needed to produce a complete query module. This page includes:
Sequence is not important in which end you create first (the Interface XML files or the back-end files); more than one person may be involved in creating the various files. The important thing is to make sure the names of variables match across all associated files. ![]() Figure 3-1. Environment Containing the Interface and Back-End Files Suggested Practices
Table 3-1. Interface XML and Back-end File Types Overview of Interface XML FilesThe XML files you create are definition and control files that are transformed (via XSLTs) into the HTML pages shown to the user.Note: The merge process that accomplishes this is controlled
by a Java servlet that applies the appropriate XML Style sheet Language
Transformations (XSLT) to a certain XML file. The files involved in that process
are contained within the Application server, but are not created or maintained by
IBIS-Q administrator.
HTML Content FilesThe HTML content type XML files provide a consistent way to deliver basic HTML content to a user. The main element of this type of XML file is the CONTENT element. The CONTENT element contains the page's body HTML. Any XHTML may be embedded within this element tag. This allows the page developer to focus solely on the HTML body content of the page. The HTML code for the navigation, banner, header and footer, javascripts, and style sheets are all handled within one transformation file named "home.xslt". The advantage of this design is that the common page HTML code is only stored in one location and usable by many pages.The Content must be in the form of XHTML. Be aware that XML includes a few oddities, such as having to escape some characters and not being able to use the HTML tag "nbsp". Note: These types of files are not really "pure" XML data documents in
that they have presentation and formatting information in them in the form of embedded XHTML
tags/elements. This approach helps produce consistent pages with a simple mechanism to
localize body HTML content within the existing system. The HTML formatting flexibility is
retained without adding the needless complexity of creating a true XML data implementation
where the content is separate from the presentation.
Measure Selection FilesThe Measure Selection XML files provide elements that describe a module measure or configuration selection page. The main purpose of a measure selection page is to build selections that drive the user to a specific module.xml with a specific measure or configuration selected (where the user is then able to define and submit a query to the IBISQ system). These XML files, when transformed or formatted with the selection XSLT, produce a HTML measure selection page.The very end selection item of a measure selection consists of specifying a module.xml and measure/configuration within that module file. The measure selection file contains OVERVIEW data elements but the main elements are SECTION, SELECTIONS, and SELECTION. Query Builder FilesQuery Builder consists of three major elements:
Of these three, only the QUERY_MODULE element resides in the Interface XML file. After the user leaves the query builder page a Java servlet adds REQUEST and IBISQ_QUERY_RESULT dynamically to the QUERY_MODULE element for temporary use. The Interface XML file contains measure and configuration definitions (CONFIGURATIONS), CGI application control parameters (PARAMETERS), overviews and section or step definitions (CRITERIA), and dimension data (DIMENSIONS). These Interface XML files, when transformed or formatted with the module.xslt, produce an HTML module page that allows the user to define query filters and specify how the result values should be summarized or grouped for display. The balance of the XML data displayed on the query confirmation and query result type pages are dynamically added by the servlet. When a module and measure configuration is selected, the servlet loads the module XML file into memory. When the user submits the query, the servlet creates the REQUEST element and appends the user-specified filtering criteria and data grouping selections to this element. After the Query servlet has retrieved the XML data from the CGI application, the IBISQ_QUERY_RESULT element is created, and the actual query record data is appended. Procedure for Creating Interface XML Files for a Sample ModuleThe following sample uses the Mortality dataset in creating MortSelection.xml.Create the Query Selection PageNote: Line references in the following procedure refer to the example
shown in Query Module Selection
Example.
Create the query selection page, MortSelection.xml.
Create the Query-Builder PageCreate the query-builder page or module file, Mort.xmlNote: Line references in the following
procedure refer to Query Module
Example.)
Test and DebugDisplay the pages and make sure clicking on the Crude Rate measure on the selection page takes you to the query-builder page. (See Figure 3-2.) The name of the measure should appear in the URL for the query-builder page. You can also submit the query and make sure the appropriate information is displayed at the top of the confirmation page.
For more detailed testing procedures and troubleshooting see Testing Modules and General Troubleshooting Steps. For step-by-step instructions for creating the back-end files see Create Back-end Files. For an overview of back-end files and their location see Create IBIS-Q Control Files. |