xmllint and xsltproc

I've been recently developing XSL transformations. I've been implementing C++ code to edit XML files using XPath values too.

I had previously used xsltproc, the command line utility distributed together with libxslt to test and debug my XSL transformations.

I have also used xmllint to validate hand-written XML files in order to be both well-formed and valid against a given DTD or XSchema.

But I recently discovered a wonderful xmllint feature: the --shell option. It runs an interactive shell that allows the user to navigate within the XML document as in a file system. But navigating is not the most useful feature I found for the shell option: it's the xpath command.

It allows to quickly check what node-set will be obtained when applying an XPath expression to a given XML input file.

It's a really useful utility when writing complex XPath expressions or checking out results for XPath expressions on complex documents.


Wikileaks: shooting the messenger

Bruce Schneier states some extremely sane and reasonable points on the Wikileaks diplomatic cables leak case.

License vs. HTML/Javascript Gadget

So I've been customizing my blog a little by adding some gadgets. That's how I got to know about the HTML/Javascript Gadget - provided by Blogger - allowing to add user provided HTML/Javascript code. So at first I thought it made the License Gadget I developed kind of useless.

I tried the HTML/Javascript Gadget and configured it using the CC provided code for a by-nc license and this is how it looked on this blog:

The License Gadget looks like this:

So text and image are not centered in the raw CC provided code, which would require user customization of the HTML code. On the other hand, style sheet settings are respected. So at some point I'll have to search out how to achieve it.

So I was happy to realize that my effort on developing the License Gadget were not only useful for learning (which was a primary reason to do it) but it actually provides some additional value over the HTML/Javascript Gadget.


License Gadget

In the last post, I wrote down the reasons for my choice of a Creative Commons By-Nc license. This post is about the details on how I managed to place the license text in the blog.

I checked the Creative Commons site (CC) to look up license types and details and found out - as I was expecting - that the site offers the service to generate the HTML code to be inserted into a web page in order to display a license text and link to the Commons Deed provided by CC.

Once I had the code for the license I chose I googled for instructions on how to publish the license text into a Blogger blog. All the information I found was either staled (talking about setting options which are no longer available) or suggested to manually edit the blog template.

I checked the blog settings provided by Blogger and tried to paste the license HTML code into the text box left for customisation of the 'Attribution' blog footer section.

It turned out that text size limit does not admit to include the whole license code. So after experiencing a slight frustration feeling I figured out there might be a Google Gadget to display the blog license, since Blogger seems to set up the blog layout based on Gadgets.

I found none and thought that it might not be too hard to create one that just displayed the copy/pasted license HTML code. So I decided to create my first Google Gadget. I found all the information I needed at the Google gadgets.* API Developer's Guide.

My knowledge on HTML, CSS and Javascript was quite forgotten. It's never been too much anyway, I just learned the basics in college. So I had to check out a couple of online tutorials.

First and more surprising issue I encountered was that I couldn't get the Google Gadget Editor (GGE) to work properly on the Chromium browser! Somehow, weird invisible characters were being inserted/removed when I saved changes so the Gadget's XML code failed to be parsed. So after a while trying to figure out what was going on, I gave up and assuming my perplexity, I tried out Firefox and it worked perfect.

Then I had issues dealing with Javascript code errors, which are annoyingly silent for someone like me, since I'm used to work with compiled languages and have that really nice help that are compiler errors.

But after struggling with the new development environment (GGE), languages with which I'm not familiar, and a tough testing environment (Google Gadget Checker helped), I finally managed to get a basic Google Gadget that displayed a Creative Commons license text and links. The Gadget allows the user to chose the kind of CC license to display. You can see how it looks at the bottom of this page.

I have submitted it to the Google Gadgets directory and it might be available there at some point. Meanwhile, it can be included in any Blogger blog using this URL: http://hosting.gmodules.com/ig/gadgets/file/115386175924349751853/cc.xml.

You can also include it in any webpage (not necessarily a Blogger blog) clicking here.



I've been thinking on licensing contents for this blog. I was sure on using a Creative Commons license, but was doubting on the options.

I finally chose an Attribution Non-Commercial license not because I don't want contents here to be used for commercial purposes but because I don't want that to happen not noticing it.

So I'm not against commercial uses of this contents, just let me know if you want to do such a use.

I thought about including the ShareAlike restriction to the license, but finally discarded it. Attribution is enough, I just don't need to restrict further use. If you want to include any of this contents into a copyrighted work, just feel free to do it as long as you give me credit for my contents.



Some years ago, when I realized I had to quit my first serious job, I started up updating my resumé. That's the time when I first thought about what was there in my resumé that may actually make it more interesting than any of my co-workers' for a potential employer.

Some months after taking a new job I met some of my then ex co-workers for a beer and one of them asked what was I working on in my new job. Among other things, since I was using VMware appliances for both test and build environments, I told him I was working with virtual machines. So he replied 'Ah, so you're working with Java'. The only virtual machine he ever heard about was the JVM.

This is just an example, but in a general way my knowledge about software development technology and tools was deeper than his. In spite of that, his working experience was 2 or 3 years longer than mine. I also know people who has deeper knowledge than mine and have less time of experience.

So my conclusion on this was that any time you read in a resumé 'X years experience in Y', you should take it for 'X years seniority in Y'. So experience means the length of time that someone has been practicing or just in slight contact with a given technology or tool. In a resumé, experience and expertise have little to do.

In one of my recent readings (Rework) there is a section dedicated to this subject. It is pointed out there with this words:
How long someone's been doing it is overrated. What matters is how well they've been doing it.
But how can you get to know it?



This is a project that has been around my head for a while now. The truth is that the feeling to start writing a blog has been getting much stronger for the last months.

I'll try to be disciplined on writing at least one post a week. It is not a hard to achieve objective, but I hope it will make possible two things: a) get myself used to analyze, write and communicate on various subjects on a regular basis with a soft transition (from thinking to actually doing), and b) I'll get the chance to think about any actual progress or experience (or lack of any) in my work life every week.

For months, I've been thinking about where to write, whether to limit myself to write about software and technical stuff or have a broader range of subject, where to open it, whether to register my own domain or not, to set it up on my own server and use wordpress or drupal or just use a blog service out there, and then which one?, ...

The little push in the back that I actually needed to start this up has been reading Rework. I finally realized that basics for a blog are content and where or how to hold it are secondary. So I took what I have right now, which is my Google account.

Let's see where it gets.