Learning:
The Journey of a Lifetime
A Cloud Chamber of the Mind

January 2006 Technology Notebook

Introduction      
Goals
   

Thursday, January 12 2006 3:50 PM

There are 16 sections to Chapter 1 Getting Started with Stylus Studio. I am going to keep my notes for the first three sections and add to them this morning. I will begin making my notes with Section 4. There are some video demonstations that do not appear to work when I am on dial-up. I may have to go into Lismore and try these on a broadband connection.

Section 1 Starting Stylus Studio

Double-click on the icon to begin the program.


Section 2 Updating an XML Document - Getting Started

  • Opening a Sample XML Document

Use File -> Open to navigate to the appropriate location where the XML file is located and double-click on the file name.

Program Files -> Stylus Studio 2006 XML Professional Edition -> examples -> examples.professional -> quotes -> your-quotes.xml

  • Set parameter to display line numbers in the text editor

Select Tools -> Options... -> General -> Editor General

  • One can simply type the new code into the file while in Text view. Stylus Studio will display pop-up lists of valid choices whenever it can.

  • When an XML document has an internal DTD, one can edit view and edit it in both the Schema tab and the Text tab of the XML editor. The Schema tab works by selecting options from pop-up windows, which is great if one understands the options.

  • To create an external schema file for an XML document, open the XML document and click on the Schema tab. Select XML -> Create Schema from XML Content. One obtains a Create Schema or DTD dialog box. Select Generate XML Schema and specify a path name.

  • To create an internal DTD specification within the XML file, open the XML document and click on the Schema tab. Select XML -> Generate DTD and click on the Internal radio button.

Section 3 Working with Stylesheets - Getting Started

  • Stylesheets can generate either HTML files or XML files.

  • Stylus Studio creates .xsl files using the XSLT Editor (This is a different editor that the XML Editor.).

  • The XSLT Editor works with 4 tabs: XSLT Source, Mapper, Param/Other and WYSIWYG.

  • One can easily edit the stylesheet using either the XSLT Source tab or the WYSIWYG tab. The basic idea is to create "templates" that (a) match a specified condition and then (b) give the instructions for displaying the output.
    • Note: I have done something to the your-quotes.xsl file and it no longer prints the heading.

  • To apply a stylesheet to an XML document in Stylus Studio, you use a scenario. A scenario is a group of customizable settings that allows you to experiment with different source XML documents.

  • Subsection 3.4 is about revising an HTML file that displays a page to display all of the records in a data base.
    • First import the HTML file into the XSLT Editor. This is a bit tricky as one begins by selecting the Document Wizards option under the File menu. One then clicks on the XSLT Editor tab. Then one selects the XML file. However the result is impressive as Sylus Studio immediately creates a stylesheet file in the XSLT Editor.
    • The next step is to create a Stylus Studio Scenario. A Scenario associates a stylesheet (the .xsl file) with the XML data file (the .xml file). Click on the Preview Result icon (small green traingle) and obtain a Scenario Properties window. Give the scenario a name, type in the path name for the XML file and then type in the absolute path name to the folder that will contain the resulting xsl file. The result so far is to display the information for the first data record.
    • Double-click the repeating element (e.g. video) in the source tree on the right side of the screen. This will create an empty template. Select all of the code in the xsl file that displays the information for one record. Cut this code and paste it into the template that was just created.
    • Go back to the spot where you cut the code and type <x . A completion pop-up window will appear. Scroll down and double-click on xsl:apply-templates, type a space, double-click on select, double-click result, type a /, double-click videos, type a /, double-click video, type "/> . This will select all of the video elements for processing. Click Preview Result icon. You will see a series of displays, one for each record. However each display is the same. I still need to modify the code to pull in the information for each record.
    • For each field click once on the display to locate the code in the XSL file. Then delete the data from the code and replace it with <x which will open a pop-up window. Select xsl.apply-templates, type a space, double-click on select, double-click result, type a /, double-click the name of the field, type a /, double-click video, type "/> .

Section 4 Stylesheets That Generate HTML - Getting Started

  • The WYSIWYG tab of the XSLT Editor is used to create stylesheets that generate HTML.
  • The 'books' example describes a situation where one had an XML data file containing a number of records and wishes to display all of this in a table.
  • The first set of instructions show how to create the table and the following instructions show how to format the table.

4:40 PM I have successfully followed the instructions for creating a table and formatting it to display all of the records in an XML data file. My Australian birds XML file should work with this. Now to see if I can make this work. Yes. I still have some work to do here, but I was able to create a table, set the background color for each column, and modify the font in different columns. This is a genuine start. 5:10 PM