About Me
I work full time in Seattle and am taking INFO 498 winter term 2008 as a non-matriculated student. I usually work in Java on a Mac, so I am looking forward to learning about C# and Visual Studio and XML editors.
INFO 498
Last updated: February 14, 8:59pm, 2008
Jan 8, 2008
Since I don't have a program that does XSLT processing yet, I tried two different methods to read XSLT scripts: using the Firefox browser and by installing the Xalan and Xerces XML libraries on my mac and using the command line XSLT xalan processor. The downside to using Firefox is that you can't see the results of the template processing in the browser source. I used the Firebug plugin to look at the resulting DOM tree, but that was tedious.
To get Firefox to process the XML using the XSLT, you need to add an XML directive to the BantamChickens.xml file:
<?xml-stylesheet type="text/xsl" href="BantamChickens.xsl"?>
Then, just load the XML into the browser, and it will display the result of processing the XML using the XSLT.
Xalan is better because it produces an output file. To install Xalan, I downloaded the xalan-j_2_7_0 and xerces-2_9_1 libraries from xml.apache.org and installed them into a directory called Lib. In my Projects directory, I placed the BantamChickens.xml file downloaded from the INFO 498 web page, and created a simple XSLT file, BantamChickens.xsl, that currently does nothing except put a few HTML tags into the output.
For some reason, both the result of processing with Firefox, and the output file created using Xalan are showing some strange characters that aren't in the input file, but I haven't yet diagnosed the problem.
You can find more details about using the command line Xalan XSLT processor on the xalan-j web page at apache.
Jan 9, 2008
Today I worked on Bantam Chickens, and was able to get an XSL stylesheet transform working: BantamChickens.xsl, which creates this html output: BantamChickens.html
It took me a long time to figure out how to select the correct templates
to match the children of the original template definition (ie, the one
that matches "/"). For instance, to select the
<description> element inside
Bantams, I had to use
<xsl:apply-templates select="Bantams/description"/>
Originally, I had left off the select altogether, and so
each apply-templates kept matching the first child template
instead.
I wrote this XSL using a trial version of the Oxygen XML Editor which I downloaded and installed today, and tested the XSL in both Oxygen and Xalan.
Jan 10, 2008
The PenPals exercise XSL and HTML is below. I noticed that the ordering of the pen pals in the XML must be different than what Terry used to create his example on the class website, since my "second penpal" is Hortense, not Frances.Jan 15, 2008
Wedding Chocolates
Organization
Van Gogh
Jan 20, 2008
This is the
Bank Statements lab puppy.
I tried to find a way to do a select "with a namespace" as a default
so that I could say, foreach au:bank, find all name elements and
amount elements, without having to specify au:name. I also tried
to find a way to wildcard the namespace, so I could say, for each *:bank.
I wasn't able to find a way to do either, so in order to list out the
foreign statements, I specified the au namespace and the ca namespace explicitly
in two foreach statements and all the selects within each foreach.
Feb 5, 2008
Musician Validator
Project to architect the name of a musician.
- Code for the Form
- Code for the MusicianInfo class, which does the heavy lifting for the application.
- Screen Shot 1 (Loading the musician files)
- Screen Shot 2 (Validating the files)
- Screen Shot 3 (Extracting the musician names)
- Screen Shot 4 (Loading a file with an error)
- Screen Shot 5 (Validation fails and shows message)
Musician Creator
[ Coming Soon ]- Code
- Musician File:
- Musician File:
- Musician File:
- Musician File:
- Musician File:
Feb 14, 2008
Album Validator and Creator
For this exercise, I combined the validator and creator into one application.
- Form1.cs
- AlbumInformation.cs, which does the heavy lifting for the application.
- Album.cs, a class used to represent an album
- Screen Shot 1 (Loading the schemas)
- Screen Shot 2 (Loading the XML and validating the albums)
- Screen Shot 3 (Extracting the album names from the files)
- Screen Shot 4 (Creating a new album)
- Screen Shot 5 (Validating the new album)
- Cowboys.xml (Album 1)
- Lanterna.xml (Album 2)