Thursday, July 14, 2011

Blank XMLNS Woes

Last week I was working on generating some XHTML via XML and XSLT. One of the goals that I had for the project was to make the output XHTML validate without any errors, using the W3C Markup Validator. I was able to get pretty quickly down to the point of only a handful of errors. Unfortunately, these errors were all regarding an xmlns="" attribute that was appearing on a number of HTML tags.

Further investigation revealed that the attribute was appearing only when I included xmlns="" on my html tag. Also, I was able to narrow down the issue to HTML markup that was generated in additional XSLT files that I included from my main XSLT file.

I did some additional research, as I wasn't quite sure yet where my clues were leading me. Articles such as this one from Bytes helped me to come down to the root of my issue. The HTML tags with the xmlns="" attributes were not in the same XML namespace as my html tag. In order to fix the issue, I had to move the xmlns attribute from my generated html tag to the xsl:stylesheet tag of each XSLT file that I was using.

The resulting tag looked like this:

<xsl:stylesheet version="1.0" xmlns="" xmlns:xsl="">

Running a transform after making this change resulted in the xmlns attribute appearing only on the html tag, as expected. Once this was done, I was able to validate my XHTML successfully.

Friday, May 20, 2011

Getting Started With Screencasting

This week I found myself tasked with giving a presentation at a company developer group meeting. Having a limited amount of time, I didn't want to have to run through a live demonstration, knowing that something will go wrong when you least expect it. With this in mind, I remembered some recent screencasts that I had seen, that proved to be nice tutorials for performing fairly simple tasks with which I was not yet familiar. It seemed like this would be an ideal time to get my feet wet with screencasting, so I figured why not give it a shot.

After doing some research and giving a couple of other products a try, I decided to go with Wink, and I have to admit that I was very pleased with the results. Not only were the results more than sufficient for my purposes, but the application is freeware, so you won't hear me complaining about the price.

When you start out with a new project, you have to select an area of your screen where you would like to do the capturing. After having done that and choosing to minimize wink to the system tray, you need to issue a key combination (ALT + Pause in my case) to get things rolling. Once recording begins, you simply need to perform the desired actions within the previously selected area of the screen. In my case, I was recording some JavaScript debugging, using Microsoft Visual Studio. When you have completed the tasks that you would like to record, you simply issue the same key combination that you started the recording with and return to Wink.

Having completed the recording, you will be presented with a series of screenshots that Wink took during the recording session. I was impressed with just how easy it is to edit a screencast with Wink. I will admit that I walked through one of their provided tutorials first, just to get a feel for things. Anyway, I found it quite easy to edit slides as needed, adding conversation bubbles on slides that I wanted to emphasize. Wink also provides a feature whereby you can add a button, and have the presentation stop until the button is clicked.

There were a couple of caveats that I encountered, but these were on the minor side. First, recorded typing was very slow using the default framerate. Thankfully, Wink lets you set a time for each slide to be viewed. I ended up setting my typing slides to .05 seconds, which proved to yield a fairly realistic quick typing result in the end product. Second, Wink did not always capture the mouse cursor where I expected it to. For example, I wanted to demonstrate that clicking on a particular tab would result in certain content being displayed. However, the mouse was not even captured moving over the tab. It turned out that this was easily remedied, as the mouse cursor is captured as an editable object. You simply need to drag the cursor to the desired location for the slide in question.

When you are finished doing your editing, Wink outputs the slides into a Shockwave Flash video and accompanying HTML file. I found that I had to do a bit of tweaking with mouse cursor positions and slide timings, but I was mostly pleased with the initial result. All in all, Wink worked great for my purposes, and I will definitely give it a shot again in the future. I found that with each screencast I created, my proficiency increased, making the final screencast a no-brainer. It's so easy, that I will likely use it as a tool the next time that a non-technical friend or relative asks me for details on how to perform a technical task.