Robert,
Maybe an issue with e-mail as well, but it appears your input document is
missing "<table>".
-- Santiago
On Jan 12, 2010, at 10:18 AM, Robert Quan wrote:
> Hi Henry,
>
> Below are the stylesheet and input xml data used. I will put in a bug on
> Jira as you suggested.
>
> Stylesheet
> ----------------
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE xsl:stylesheet [
> <!ENTITY nbsp " "> <!-- NO-BREAK SPACE -->
> ]>
>
>
> <xsl:output method="html" indent="yes" />
>
> <xsl:param name="rowstart">1</xsl:param>
> <xsl:param name="rowlimit">20</xsl:param>
> <xsl:param name="sortcolumn">5</xsl:param>
> <xsl:param name="sorttype">number</xsl:param>
> <xsl:param name="sortorder">descending</xsl:param>
>
> <xsl:template match="/">
> <xsl:apply-templates />
> </xsl:template>
>
> <xsl:template match="*/p">
> <xsl:copy-of select="." />
> </xsl:template>
>
> <xsl:template match="*/pre">
> <xsl:copy-of select="." />
> </xsl:template>
>
> <xsl:template match='*/tab...@class="summary"]'>
> <xsl:copy-of select="." />
> </xsl:template>
>
> <xsl:template name="getActualRowstart">
> <xsl:param name="totalrows" />
> <xsl:choose>
> <xsl:when test="0 = $totalrows">
> <xsl:text>0</xsl:text>
> </xsl:when>
> <xsl:when test="$rowstart > $totalrows">
> <xsl:value-of select="(floor(($totalrows - 1) div $rowlimit) *
> $rowlimit) + 1"/>
> </xsl:when>
> <xsl:otherwise>
> <xsl:value-of select="$rowstart"/>
> </xsl:otherwise>
> </xsl:choose>
> </xsl:template>
>
> <xsl:template match='*/tab...@class="formatted"]'>
> <xsl:variable name="totalrows"><xsl:value-of select="count(tbody/tr)"
> /></xsl:variable>
> <xsl:variable name="actualRowstart">
> <xsl:call-template name="getActualRowstart">
> <xsl:with-param name="totalrows" select="$totalrows"/>
> </xsl:call-template>
> </xsl:variable>
> <xsl:copy>
> <xsl:copy-of select="@*" />
> <xsl:apply-templates />
> </xsl:copy>
> <div class="table-metadata" style="display: none;">
> <span class="table-metadata-total-rows"><xsl:value-of
> select="$totalrows" /></span>
> </div>
> <div class="table-metadata" style="display: none;">
> <span class="table-metadata-row-start"><xsl:value-of
> select="$actualRowstart" /></span>
> </div>
> </xsl:template>
>
> <xsl:template match="thead|tfoot">
> <xsl:copy-of select="." />
> </xsl:template>
>
> <xsl:template match="tbody">
> <xsl:variable name="totalrows"><xsl:value-of select="count(tr)"
> /></xsl:variable>
> <xsl:variable name="actualRowstart">
> <xsl:call-template name="getActualRowstart">
> <xsl:with-param name="totalrows" select="$totalrows"/>
> </xsl:call-template>
> </xsl:variable>
> <tbody>
> <xsl:for-each select="tr">
> <xsl:sort select="td[position() = $sortcolumn]"
> order="{$sortorder}" data-type="{$sorttype}" />
> <xsl:if test="position() >= $actualRowstart and
> position() < $actualRowstart + $rowlimit">
> <xsl:element name="tr">
> <xsl:choose>
> <xsl:when test="position() mod 2 = 1">
> <xsl:attribute name="class">shaded</xsl:attribute>
> </xsl:when>
> </xsl:choose>
> <xsl:copy-of select="*" />
> </xsl:element>
> </xsl:if>
> </xsl:for-each>
> </tbody>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
> Input XML Data
> ----------------------
> <div>
>
>
> <tr>
> <td>Elapsed Time (hh:mm:ss): 00:00:10</td>
> </tr>
> <tr>
> <td>VLAN 530</td>
> </tr>
>
> <thead>
> <th class="columnHeader sortAsText" width="16%">Address</th><th
> class="columnHeader sortAsNumbers" width="12%"><a href=""
> onclick="return(top.graphSingleTimestampResults('graphName=top-talk-grph|desc=SmartSight
> Top Talkers by MAC for VLAN
> 530|cir=10000|dir=|dataSetIndex=1|count=3|label1=0011.434E.8044|value1=0.0|label2=0012.F01A.ED76|value2=0.0|label3=0003.FEAB.6C23|value3=0.0|deviceId=2'));">Bit
> Rate
> (Mbps)</a></th><th class="columnHeader sortAsNumbers" width="12%">Utilization
> (% of CIR)</th><th class="columnHeader sortAsNumbers" width="12%">Pkt Rate
> (pkts/sec)</th><th class="columnHeader sortAsNumbers" width="12%">Total Bit
> Count (Mb)</th><th class="columnHeader sortAsNumbers" width="12%">Total Pkt
> Count</th>
> </thead>
> <tbody>
> <tr class="shaded">
> <td class="rowDataLeft">0011.434E.8044</td><td
> class="rowDataRight">0.000</td><td class="rowDataRight">0.000</td><td
> class="rowDataRight">0.433</td><td class="rowDataRight">0.003</td><td
> class="rowDataRight">4</td>
> </tr>
> <tr class="">
> <td class="rowDataLeft">0012.F01A.ED76</td><td
> class="rowDataRight">0.000</td><td class="rowDataRight">0.000</td><td
> class="rowDataRight">0.200</td><td class="rowDataRight">0.002</td><td
> class="rowDataRight">2</td>
> </tr>
> <tr class="shaded">
> <td class="rowDataLeft">0003.FEAB.6C23</td><td
> class="rowDataRight">0.000</td><td class="rowDataRight">0.000</td><td
> class="rowDataRight">0.500</td><td class="rowDataRight">0.003</td><td
> class="rowDataRight">5</td>
> </tr>
> </tbody>
> </table>
> </div>
>
> From: Henry Zongaro <[email protected]>
> To: [email protected]
> Sent: Tue, January 12, 2010 8:56:51 AM
> Subject: Re: NullPointerException with Java 1.6 on AIX
>
>
> Hi, Robert.
>
> Robert Quan <[email protected]> wrote on 01/11/2010 09:07:07 PM:
> > I have a problem with executing a simple transformation using a
> > translet on AIX 5.2 with JAVA 1.6; it throws the following exception:
>
> Thanks for providing the Java source code for the transformation. I suspect
> that you will have to provide a stylesheet and input document that are needed
> to reproduce the problem.
>
> I would encourage you to report this as a bug in Jira.[1]
>
> Thanks,
>
> Henry
> [1] https://issues.apache.org/jira/browse/XALANJ
> ------------------------------------------------------------------
> Henry Zongaro
> XML Transformation & Query Development
> IBM Canada Lab T/L 313-6044; Phone +1 905 413-6044
> mailto:[email protected]
>
>