[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: RuntimeException : Programmers's assertion from xs

Subject: Re: RuntimeException : Programmers's assertion from xsl transform
From: "Simon Kelly" <kelly@xxxxxxxxxx>
Date: Fri, 4 Jul 2003 14:25:09 +0200
xsl null test
I'm having a struggle to pin point the run-time error with this.

I have narrowed it down to in being caused by a test="" statement, with a
quick search of the net. But I cannot see any problem with any of my test
statements.

Could someone see if they can spot the bloomer!

test="$image-node-list"
-- Requires a return of true if list is not null.

test="not($image-node-list)"
-- Require a return of true if list is null

test="($finish - $start) = $images-across"
test="$start = $finish"
test="$start < $finish"
-- Obvious returns, all values are numbers.

test="$image-node-list[$start]/link"
-- Requires true if link node exists

test="$image-node-list[$start][position() = last()]"
-- Require true if the node at position $start is the last node in node set

As always, all help greatfully recieved.

Cheers

Simon







----- Original Message -----
From: "Simon Kelly" <kelly@xxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Friday, July 04, 2003 11:43 AM
Subject:  RuntimeException : Programmers's assertion from xsl transform


> Hi all,
>
> I am getting a run time error from an xsl transform, but I don't have a
clue
> what this means. Any help would be greatfully recieved. I've included part
> of the code where I think the problem may lie.
>
> "java.lang.RuntimeException: Programmer's assertion in getNextStepPos:
> unknown stepType: -1"
>
> Cheers
>
> Simon
>
> [code]
>     <xsl:template name="image-layout-left-to-right">
>         <xsl:param name="image-node-list" select="/.." />
>         <xsl:param name="images-across" select="2" />
>         <xsl:param name="start" select="1" />
>         <xsl:param name="finish" select="$start + $images-across" />
>
>         <xsl:variable name="row-start" select="&lt;tr&gt;" />
>         <xsl:variable name="row-end" select="&lt;/tr&gt;" />
>
>         <xsl:choose>
>             <xsl:when test="$image-node-list">
>                 <xsl:if test="($finish - $start) = $images-across">
>                     <xsl:value-of select="$row-start" />
>                 </xsl:if>
>                 <xsl:if test="$start = $finish">
>                     <xsl:value-of select="$row-end" />
>                 </xsl:if>
>                 <xsl:if test="$start &lt; $finish">
>                     <!-- Process the node at position() = $start -->
>                     <td>
>                         <xsl:if test="not($image-node-list[$start]/link)">
>                             <a href="{$image-node-list[$start]/link}">
>                         </xsl:if>
>                             <img src="{$image-node-list[$start]/src"
>                                  alt="{$image-node-list[$start]/alt"
>                                  height="{$image-node-list[$start]/height"
>                                  width="{$image-node-list[$start]/width"
>                                  align="{$image-node-list[$start]/align"/>
>                         <xsl:if test="not($image-node-list[$start]/link)">
>                             </a>
>                         </xsl:if>
>                     </td>
>                 </xsl:if>
>
>                 <!-- Call the template again reajusting the required
> parameters -->
>                 <xsl:call-template name="image-layout-left-to-right">
>                     <xsl:with-param name="image-node-list">
>                         <xsl:choose>
>                             <xsl:when
> test="$image-node-list[$start][position()] = last()">
>                                 <xsl:value-of select="/.." />
>                             </xsl:when>
>                             <xsl:otherwise>
>                                 <xsl:value-of select="$image-node-list" />
>                             </xsl:otherwise>
>                         </xsl:choose>
>                     </xsl:with-param>
>                     <xsl:with-param name="images-across"
> select="$images-across" />
>                     <xsl:with-param name="start" select="$start + 1" />
>                     <xsl:with-param name="finish">
>                         <xsl:choose>
>                             <xsl:when test="$start = $finish">
>                                 <xsl:value-of select="$finish +
> $images-across" />
>                             </xsl:when>
>                             <xsl:otherwise>
>                                 <xsl:value-of select="$finish" />
>                             </xsl:otherwise>
>                         </xsl:choose>
>                     </xsl:with-param>
>                 </xsl:call-template>
>             </xsl:when>
>             <xsl:otherwise>
>                 <!-- Code to write packing cells -->
>             </xsl:otherwise>
>         </xsl:choose>
>     </xsl:template>
> [/code]
>
> "I have often wondered how it is that every man loves himself more than
all
> the rest of men, but yet sets less value on his own opinion of himself
than
> on the opinion of others." -- Georg Christoph Lichtenberg
>
> Institut fuer
> Prozessdatenverarbeitung
> und Elektronik,
> Forschungszentrum Karlsruhe GmbH,
> Postfach 3640,
> D-76021 Karlsruhe,
> Germany.
>
> Tel: (+49)/7247 82-4042
> E-mail : kelly@xxxxxxxxxx
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.