Tofu has to be the easiest thing in the world to cook. I think people avoid it just because it's associated with vegetarians and whatnot. Just slice the extra firm tofu, put it on a cookie sheet on some oil (sesame, olive, whatever) and put some sauce or topping on the tofu. Put it in the oven at 350 for about half an hour or so and flip it half way through. That's all there is to it. If you like it crispy, a little longer in the oven.
I'm having some leftover for lunch as I write. All I added was sesame oil and soy (tamari) sauce. Yum.
One important detail I didn't mention in yesterday's post on converting between XML and HTML was the "disable-output-escaping" attribute. Using disable-output-escaping="yes" causes the result of the transform to keep "< " and "&" in the resulting document. Otherwise, they get turned in to < and &. You may have found that HTML tags, <, and & all get stripped from your XML every time you do a transform.
Sounds like someone at KDE-look is hot on SVG. They've announced a design challenge to develop wallpaper for the popular Linux desktop environment. The required format is SVG.
I haven't used KDE in a while, but maybe I can break out the knoppix CD and try something out...
So I'm off caffeine as of today. For now, that is. I'm taking a break for a few months. It's not so much a resolution as a temporary abnegation for the purpose of healing my joie de café. See, the problem with coffee is that it's a great drink. I've become accustomed to having a cup to start every day. So accustomed that I no longer notice what a nice thing it is to have in the morning.
So this year's Game Developer's Conference is going to be in San Francisco. I just got some of the promo material at work today and the same at home yesterday. California is calling me. This time of year it's always nice to think of.
In pursuit of useful applications of SVG, I've become interested in using XSL transforms to turn data stored as XML into an SVG representation. I found a good starting article at A List Apart and it pointed to a great reference by Paul Grosso and Norman Walsh. These might be dated now, but I found them helpful starting points.
On to my example. We're going to need some data. I had a look at StatsCan and found a report on population by sex and age group. I would have liked to get some more complete raw data, but it appears to cost a few bucks, so I'll make do. I believe there are ways to scrape the data out of the table with just XSLT, but since this is a learning experience for me, I decided to skip that step by just pulling the numbers out by hand and creating an XML file with a text editor.
The results of my effort look a little like this:
The root node is called "populationbyageandsex" and each record (or row of data) is kept in a "recordbyagegroup". Between the open and close tags for "recordbyagegroup" are the fields for that record. Each field has a unique name and the content (between the open and close tags) of the element is the value of the field. The format is something I just made up for this example, XML is nice that way.
The next step was to write the XSL transformations that would understand the data well enough to create a chart in SVG.
I expect that a lot of what comes up in this blog will be a draft of a page for another site I'm working on. That means that when it shows up here it may not have enough polish to be ready for prime time. The upside of this is that what's lacking in quality should be made up for in quantity. Examples and pages that I consider for other sites will show up here in a raw and less tested form.
Here's hoping you find what you came for.