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

April 2006 Technology Notebook

Introduction      
Goals
Next
   

Monday, April 24 2006 5:30 am

Notes based on the W3C tutorial web pages for XML.

 

I am going to begin the day by taking an XML file (on Australian birds) that I created a few months ago and try creating a very simple XSL file using Stylus Studio. Then I will see if I can link the two together and obtain a basic display of the data.

I had no difficulty using Stylus Studio to obtain the XML file and I was able to quickly create an XSL file using the XSLT Editor. However I was not able to actually create the code to display data from the XML file.

Now it is time to look at the Documentation for chapter 4 Working With XSLT


The idea is to create a set of "templates" that the XSLT processor can use to process when it encounters a particular node in the XML docurment.

"It is important to understand that the contents of the XML source document do not dictate the order of XSLT processing. The XSLT processor performs only those actions that you specify, and operates on only the source nodes that you select." [Stylus Studio Documentation: chapter 4 Instantiating the First Template]

 


At this point I think I have the basic idea of using Stylus Studio. It appears to be a very powerful software package. The overall sequence of steps is to create an XML file, then create an XSL file using a "scenario" to link it to the XML file. When creating the XSL file one needs to create a series of "templates", each of which specifies what to do when the processor matches a particular node (path name).

I now have the final step (which has been eluding me!). Once I preview the result, I then Save the Preview as a .htm file. Now the remainder of my Learning is simply to learn how to use the XSLT Editor, which is a matter of detail.

The next step will be to work through a couple of examples in the Documentation and then to try it out with my Australian Birds XML file.


7:15 am

8:40 PM

I am going to try creating a set of steps with screen captures to document the basic ideas of XML and XSL using Stylus Studio.


Begin by opening Stylus Studio and select New -> XML Document from the File menu:

One then sees the following display:

At the bottom of the central window there are four tabs.

Toggle among them to see different displays of the same file. Text shows the actual XML code where one can see the actual tags that are created by Stylus Studio. Use the Text tab to begin creating the structure of the data file.

 

Click on the "New Element Definition" icon on the left side of the Schema window:

Stylus Studio adds a new element. The next step is to specify the properties for this element. First, type in an appropriate name for this element.

Now click on the "New Modifier" icon on the left side of the Schema window.

Stylus Studio displays

Select the Sequence modifier. This indicates that there will be a sequence of elements within the ozbirds element.

Now click on the "Add #PCDATA" icon to the left of the Schema window:

You will then have:

Note: PCDATA is an acronym for parsed character data, which means it may contain any valid characters.