... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)

2007-05-30

Hibernate Session.isDirty()

Hibernate's Session class has the method isDirty() which tells you whether there are any changes that still need to be synchronized with the database, i.e. that there are still pending operations.  Perhaps it is obvious to some, but I was caught thinking that it meant that the current Hibernate transaction contains uncommitted changes.  It doesn't.  If you want to know that, you must keep track of it yourself (perhaps by registering some listeners within Hibernate).

2007-05-25

Sharing Scripts in BIRT

You can share Javascript files across BIRT reports by manually editing the report layout XML.  Add lines like:

 <list-property name="includeScripts">
  <property>../common.js</property>
</list-property>

Relative pathnames are supported. The visual designer does not (yet) support script inclusion directly.

2007-05-23

Mercurial and SVK Version Control

Mercurial is a new version control system that specializes in distributed development.  Its distinguishing feature is that there is no central repository -- all local repositories are peers (like Gnu arch).  Synchronization occurs through change sets.  It is growing in prominence because the Mozilla 2 team has chosen to use it in favour of CVS.

When reading up on Mercurial, I came across SVK, which is an extension of SVN to support distributed development.

2007-05-17

Java 1.5 / Xalan XSLT Bug

Xalan XSLTC 2.6.0 (and by extension, Java 1.5 XSLT transformation) has a bug where it complains about a syntax error for a rule such as <xsl:template match="and"/>.  The issue is that and is a reserved word.  Only Xalan appears to exhibit this bug.  All of the other transformers that I tried worked (including IE, FF, Saxon, and Xalan 2.7.0).  The XSLT specification is silent on the matter, but the grammar does not appear to prohibit the case.

The workaround is to use a rule of the form <xsl:template match="*[local-name()='and']"/>.  Ugly, but it works.

Blog Archive