In StyleVision, you can create DB-based SPSs. These stylesheets enable you to do two things:
•Edit DBs in Authentic View, and
•Generate reports from DBs.
After you have created the SPS, you can view reports in StyleVision and generate report files in HTML and RTF format. You can also save the following DB-related XML files that StyleVision generates:
•XML Schema based on DB structure (not applicable for XML DBs, where a schema is already available)
•XML file having structure defined in the generated schema and content from the DB (not applicable for XML DBs, where the data is already available in XML format)
•SPS that you design, and which is based on the generated schema
•XSLT stylesheet for HTML output (based on design of SPS)
•XSLT stylesheet for RTF output (based on design of SPS)
The saved XML file can then be processed with the required XSLT stylesheet/s. This provides more flexible report-generating capabilities.
Note: The XML Schema and XML files are generated from non-XML DBs by StyleVision, and you cannot alter their structure or content for use in Authentic View. This is because the structure of these files is related to the structure of the non-XML DB. Editing the DB and creating reports from the DB depend on the unique XML structure generated by StyleVision from the DB.
Given below are the steps involved in creating and using DB-based SPSs. These steps cover the two uses of DB-based StyleVision Power Stylesheets: editing the DB and creating HTML and RTF reports from the DB.
•Connect to the DB with StyleVision. During the connection process you can specify what data tables in the DB should be filtered out from the XML Schema..
•When the connection is made, a temporary XML Schema is generated based on the structure of the DB and that schema is displayed in the Schema Window of StyleVision in tree form. In the case of XML DBs, a pre-existing schema (either in the DB or at a file location) is referenced.
•Temporary StyleVision-internal XML files are also created. One is non-editable (see diagram above) and is used for the previews and as the source of the generated XML data file. The other is an editable XML file, which is displayed in Authentic View (see screenshot above). When changes made to this file in Authentic View are saved (with the File | Save Authentic XML Data command), the modifications are written back to the DB. The non-editable XML file is updated if necessary each time an output view is newly accessed or when the XML data is saved.
•In StyleVision, you can define top-level filters to restrict the data imported into the non-editable XML File, i.e. for the output views and the reports.
•A DB Query is used within Authentic View to restrict the list of records displayed in Authentic View. It is used only during editing.
•If editing changes have been saved to the DB, then the next time an output view window is accessed, the non-editable XML file is updated with the modified contents of the DB and the refreshed file is displayed in the preview.
•A DB-based SPS is created in the same way as the standard schema-based SPS: by dragging-and-dropping nodes into the Design Window, inserting static stylesheet components, assigning display properties, etc. These mechanisms are described in this documentation.