Simple XSLT ifnull for numbers

Answer to question how to display zero instead of NaN in XSLT for non existing node containing number values (kind of ifnull or coallesce functions that are available in SQL). You can do it by standard expressive XSLT way, with using variable and <xsl:choose>, or abuse built-in sum() function and do whole thing in one […]

Solr Pager 0.2.2 released

Released solr_pager 0.2.2. This release fixes little bug that prevented solr_pager to work in some configurations (ie. with standard search handler). Well, Solr documentation did not mentioned that it can pass empty (null) result set to my component. Also added some sanity checks to prevent similar situation again. New version can be found on http://devel.dob.sk/solr_pager, […]

Solr Pager 0.2.1 released

Released solr_pager 0.2.1, an feature update with improved first/last page navigation. Now they appear in result only when first/last page is not visible in generated paging list. This version can be found on http://devel.dob.sk/solr_pager, for more informations about how it works see this post.

Solr Pager 0.2.0 released

I’ve just published solr_pager a search component for Solr that should make paging easier. It’s main use should be by XSLT transformation (using XSLT writer), so one should not bother anymore with slow recursive XSLT hacks and only apply fast templates on paging list in search result. Initial version 0.2.0 can be found on http://devel.dob.sk/solr_pager. […]

XSLT – copy node with attributes without childs

Simple solution for not-so-trivial problem of copying xml node with all its attributes, but without child nodes. Without the last condition, solution is easy, one would use <xsl:copy-of>, but with it things are a bit harder, you should do smt. like: <xsl:copy select=”.”> <!– this copies element name –> <xsl:copy-of select=”@*”/> <!– this copies all […]