MSI Information using XML, XSLT, & CVS Kakapo Meeting August 28, 2003
Example XML database file: msilist.xml msilist.xml Stores all the info about managed MSIs. Contents: : names of people, teams, groups, with URLs and contact info : info about clusters : info about our managed MSIs
contents:
An entry Adobe Acrobat Reader 6.0 General Productivity file://win.mit.edu/dfs/msi/a cst/adobe_reader_60/adobe _reader_mit_60.msi file://win.mit.edu/dfs/msi/a cst/adobe_reader_60/adobe _reader_mit_60.msi port/products/acrreader.htm l port/products/acrreader.htm l Extracted MSI after setup process from vendor installer using InstallShield AdminStudio. Provided MSI and MST did not work in our environment. free version Chad Dupuis Academic Computing
Example XSL template file XSL template files convert the database into desired output style are themselves in XML format Our example: msisupport.xsl msisupport.xsl Desired output style: tree of HTML files patterned after Academic Computing msi page Used HTML Tidy to turn the HTML into viable XMLHTML Tidy
Msisupport.xsl contents (output file is html) (start at top of xml file),, … (create main page) (select s) (group, sort) (display info) (make output documents for each msi),, … (create new html tree) (save to separate file)
Invoking XSLT processor generate-html.cmd generate-html.cmd Runs “msxsl..\msilist.xml msisupport.xsl -o msisupport.html” In English: Use the MSXSL processor Use “msilist.xml” as the input file Use “msisupport.xsl” as the template file Create “msisupport.html” as the main output file
Results Creates msisupport.html msisupport.html and the directory, containing: adobe_acrobat_reader_50_idafg0o_MSI_README.html adobe_acrobat_reader_60_idand0o_MSI_README.html esri_arcinfo_workstation_83_idame0o_MSI_README.html microsoft_visio_2002_idaah0o_MSI_README.html
Using CVS Created/edited files on some computer Checked into CVS “msilist” module in “pismere-test” repository on cvs.mit.edu server Deployed via pismere locker in AFS Directory hierarchy directly checked out from same module Redeploying after changes: A simple “cvs update” in pismere locker
Pros and Cons: XML PROs Free Extremely general, so any structure for database can be achieved Understood by a large and increasing number of browsers/applications Can use simple text editor to change, or more xml-aware applications. CONs Generality means we make the rules… and we have to enforce them Isn’t quite widespread enough to be easily accessible to laypeople
Pros and Cons: XSLT PROs Free General enough to get just about any look-and-feel Is also an XML document, so same tools can be used to edit CONs Difficult to learn, tedious to write But: easy enough to parrot and include; hopefully the tough parts only need to be done once Still at version 1.0, so not perfected yet Multiple output documents not natively supported, so it forces a choice of a particular processor to implement (my choice: MSXSL)
Pros and Cons: CVS PROs Free Deployment via AFS Revision control Some file conflict resolution Recovering older versions CONs Usually a command-line client Learning curve Some gotchas filename capitalization, binary/text tags, etc…