8

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

May 2006 Technology Notebook

Introduction      
Goals
Next
   

Wedesday, May 3 2006 5:50 am

Notes based on the W3C tutorial web pages for XML.


Yesterday, I completed the section on creating and editing XML files. Today I will focus on stylesheets and XSLT. This is an area where I need to improve my understanding.


Chapter 1 Getting Started with Stylus Studio

1.4. Working with Stylesheets - Getting Started

1.4.1 XSLT Stylesheet Editor Quick Tour

  • The XSLT Editor has 4 tabs for viewing and working with stylesheet files:
    • XSLT Source - this shows the actual tags and code created by Stylus Studio
    • Mapper - provides a graphical interface for working with stylesheets
    • Params/Other - needed to set a few technical parameters
    • WYSIWYG - allows one to use drag-and-drop features to create a stylesheet.
  • Stylesheets consist of a series of templates. Each template consists of a match command that identifies the node in the XML data file that the sebsequent commands will be applied to plus these actual commands which describe the formatting commands.

1.4.2 XSLT Scenarios

  • A Stylus Studio scenario is a group of settings that links a particular stylesheet to a specific XML data file and creates the new HTML code for displaying the data in a browser. A stylesheet may be applied to more than one XML file.
  • A scenario is run by clicking on the Preview icon (a green triangle) in the top left corner.

    • The result of applying the current stylesheet with the XML data file specified in the scenario is displayed in a Preview window:

    • When you have a final result that you like, click on the Export Preview icon on the left side to save the HTML file.


Following are a few comments as I go through the material of chapter 1:

  • I am not familiar with the Mapper environment. This is definitely something I need to Learn.

  • It seems to me that an individual will accumulate a library of stylesheets that can be both applied and modified to suit individual needs.

  • I have a good grasp of the overall sequence of steps to create an HTML file that will display my data in a form I like. However I am feeling a bit intimidated when I think of my current activities where I create a library of hundreds of separate HTML files to monitor my Learning activities. The problem is not so much the creation of the individual files as a file management problem of keeping all of these file organized. 6:30 am

  • 6:50 am This next section is an excellent example of how to create a display from a large XML data file (books, Cds, DVDs). I want to follow this closely as it includes images. I also want to see if I can apply the ideas to a set of Journal pages.

Chapter 1 Getting Started with Stylus Studio

1.4 Working with Stylesheets - Getting Started

1.4.3 Making a Static Web Page Dynamic Editing XSLT


  • The key idea is a file with a repeating element. This is easy to understand when one is dealing with books, movies or birds. But it takes a moment to realize that the element could be an entire daily Journal entry. This means that I could have one very large XML file containing all of my data for a month (or a year?) and then have a stylesheet that selects the data for a subset of this and displays it. But I will begin with my Australian birds file as it is much simpler.

  • The first step in this tutorial is to import an existing HTML file into the XSLT Editor. I am curious to see what happens if I try this with one of my Journal pages. Let's see ...

  • It created a comlicated stylesheet without any difficulty. However the next step asks me to associate this stylesheet with an existing XML data file. I don't yet have one of these. Interesting ... Time to back off and follow the example provided.