XSLT and the math functions

It’s interesting that a lot of math functions in XSLT 1.0 (multiplication, rounding, div, …) depend on the XSLT processor/platform and might produce different outputs. So, you might need to leave all of these operations to the processes outside of XSLT, or at least test them carefully.

Just an example:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="/">
            =<xsl:value-of select="format-number(round( 0.005 * 100) div 100, '0.00')" />
            =<xsl:value-of select="format-number(( 0.005 * 100) div 100, '0.00')" />
            =<xsl:value-of select="format-number(round( 9999.005 * 100) div 100, '0.00')" />
            =<xsl:value-of select="format-number(( 9999.005 * 100) div 100, '0.00')" />

Continue reading

GIS/SI: the DB growth

Last week another client told me that their Sterling B2B Integrator’s DB had been growing uncontrollably. I checked the DataBase Usage section and found that there are too many records to be purged – it meant that something was wrong with the Purge service. When it comes to the purge service, there are not too many options – I immediately checked the Locks and found that there had been 2 locks for about a month. Something went wrong, the Purge service setup these locks but was not able to release them. We unchecked them and 24 hours later it got back to the normal routine. Now it’s time to rebuild the indexes and shrink tables…

Gennady Kim