For some reason no WYSIWYG tool ever works for me, be it for writing texts or generating presentations. My workflow simply doesn't match the one of those tools, I end up spending too much time thinking about the look rather than the content.

In addition I like my work to be under version control and versioning big binary blobs (and gzip compressed XML isn't really better than that) isn't that cool. So I prefer tools that work on plain text.

Some time ago I tried S5 and liked it, except for the fact that I couldn't create a PDF of the real slides instead of the print view S5 provides.

Then I stumbled over the LaTeX Beamer Class and used it for an internal presentation I did this week. For somebody familiar with LaTeX this is really really great, I can only praise it. It is an "apt-get install latex-beamer" away from Debian/Ubuntu systems and I didn't have any trouble getting it to work on my Cygwin pdflatex installation at work either.

This is the example directly from the class's homepage

\documentclass{beamer}

\usepackage{beamerthemesplit}

\title{Example Presentation Created with the Beamer Package}
\author{Till Tantau}
\date{\today}

\begin{document}

\frame{\titlepage}

\section[Outline]{}
\frame{\tableofcontents}

\section{Introduction}
\subsection{Overview of the Beamer Class}
\frame
{
  \frametitle{Features of the Beamer Class}

  \begin{itemize}
  \item<1-> Normal LaTeX class.
  \item<2-> Easy overlays.
  \item<3-> No external programs needed.      
  \end{itemize}
}
\end{document}

which produces this PDF. In the end I had to select a nice theme and things looked better than anything I ever did in PowerPoint. And it certainly took me less time, was version controlled and all that.

path: /en/oss | # | Writebacks

As previously hinted or even promised XMLUnit for Java 1.2 is out.

We've added a few examples that can be used as starting points for more advanced customizations of XMLUnit's difference engine and a new subsystem that uses JAXP 1.3's validation framework, which - in theory - allows validation of other Schema languages as well.

path: /en/oss/XMLUnit | # | Writebacks

Deepal Jayasinghe provides example code for XML Schema Document validation:

If you are looking for a tool to validate your XSD against the http://www.w3.org/2001/XMLSchema.xsd Then you can build your own tool using the following code.

An alternative would be XMLUnit's svn trunk and the following code

import org.custommonkey.xmlunit.jaxp13.Validator;

        Validator v = new Validator();
        v.addSchemaSource(new StreamSource(new File(...)));
        assertTrue(v.isSchemaValid());

XMLUnit 1.2 with support for javax.xml.validation (which Deepal uses as well) shouldn't be too far away.

In theory this should work for Relax NG as well, for a reality check see this.

path: /en/oss/XMLUnit | # | Writebacks

Since last night XMLUnit's trunk contains a new Validator class that is based on javax.xml.validation which is part of JAXP 1.3 (i.e. Java5+).

The Javadocs of that package talk about supporting schema languages other than W3C's XML Schema and in particular talk a lot about RELAX NG.

The way to use RELAX NG with the new XMLUnit Validator class is pretty straight forward in code:

using org.custommonkey.xmlunit.jaxp13.Validator;

        Validator v = new Validator(javax.xml.XMLConstants.RELAXNG_NS_URI);
        v.addSchemaSource(new StreamSource(new File(".../Book.rng")));
        StreamSource s =
            new StreamSource(new File(".../BookXsdGeneratedNoSchema.xml"));
        assertTrue(v.isInstanceValid(s));

this is from a JUnit test. Unfortunately getting JAXP to use a SchemaFactory that supports RELAX NG is less simple.

To the best of my knowledge there is no JAXP implementation that supported RELAX NG out of the box. Sun's own JAXP 1.4 (Java6+) certainly doesn't. Some searching around brought me to Kohsuke Kawaguchi's Blog who should know, given his work on JAXP, Sun's Multi Schema Validator, isorelax and other stuff.

Using his isorelax-bridge and Jing didn't get me anywhere on Java6. I went back to Kohsuke Kawaguchi's article and read the comments: the bridge doesn't work with Java6 since they changed the SchemaFactory lookup algorithm. OK, tried Java5 instead - progress, I now get a NullPointerException somewhere inside of Jing, so at least it is loading the factory. Next I replaced Jing with MSV (which is here now, no matter how many links out there lead you to the WebServices stack page at Sun, so much for "good URLs never change") and really, my simplistic tests pass.

So you may have to jump through some hoops to get RELAX NG support into your JAXP setup - in my case Java5, MSV and Kawaguchi's bridge worked, but the comments indicate it should be doable with Java6 as well - but once you manage to configure everything correctly, XMLUnit will now be there to let you assert your document's validity in Unit tests. It seems that it doesn't work for compact syntax, though.

path: /en/oss/XMLUnit | # | Writebacks

When I "took over" XMLUnit development my hope was to evolve the .NET and Java versions side by side, but as usual I overestimated the time I have available and underestimated the effort it would take. As a result the Java version is now even more ahead of the .NET version than it was eighteen months ago.

Lately I needed to perform a bunch of XPath assertions in the unit tests of a .NET project and this was the first time I actually used XMLUnit.NET. We are using NUnit 2.4 and I quickly learned that the latest released XMLUnit.NET wouldn't work. Fortunately all it took was to recompile XMLUnit.

Since I've been asked for a XMLUnit version that worked with more modern versions of NUnit a few times, just grabbing the source and recompiling doesn't seem to be something people want to do.

Without further ado, here is that recompiled version. Please use the checksums and PGP signature from http://xmlunit.sourceforge.net/checksums/ to verify the integrity of the archive you've just downloaded.

XMLUnit.NET 0.3.1 is a version of XMLUnit.NET that has been compiled against NUnit 2.4 and should work on any modern version of Mono as well as all Microsoft .NET frameworks (only tested on 1.1 and above, though).

Apart from being compiled against a more modern version of NUnit, only a few deprecation warnings have been fixed when compared to XMLUnit.NET 0.3. No features have been added, no bugs have been fixed (there haven't been any bug reports anyway). Unfortunately no documentation has been added, either.

If you want to help improving XMLUnit (any platform version), your input is more than welcome. Please come over to the mailing list and raise your hand.

path: /en/oss/XMLUnit | # | Writebacks