xsl-list
[Top] [All Lists]

[xsl] Saxon error: "If none of the conditions is satisfied, an empty sequence..."

2011-05-23 17:48:11
Hello, 

When attempting to compile a stylesheet containing the following variable 
definition:

<xsl:variablename="seq_position"as="xs:integer*">
 <xsl:choose>
   <xsl:whentest="name() eq 'step1'">
       <xsl:sequenceselect="count(preceding-sibling::step1) + 1"/>
   </xsl:when>
   <xsl:whentest="name() eq 'step2'">
       <xsl:sequenceselect="count(preceding-sibling::step2) + 1"/>
   </xsl:when>
   <xsl:whentest="name() eq 'step3'">
       <xsl:sequenceselect="count(preceding-sibling::step3) + 1"/>
   </xsl:when>
   <xsl:otherwise>
       <xsl:sequenceselect="99+1"/><!--trying to placate saxon->
   </xsl:otherwise>
 </xsl:choose> 
</xsl:variable>
 
I get the error:
"XTTE0570: Conditional expession: If none of the conditions is satisfied, an 
empty sequence
  will be returned, but this is not allowed as the value of variable 
$seq_position"
 
I haven't the foggiest idea why this would be. Any help would be most greatly 
appreciated.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>