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

What's wrong with a variable inside a xsl:when ?

Subject: What's wrong with a variable inside a xsl:when ?
From: Norman Rosner <jeckyll@xxxxxxx>
Date: Wed, 20 Jun 2007 15:08:38 +0200
 What's wrong with a variable inside a xsl:when ?
Hi Folks,

i have a problem with defining a variable inside a when element.

If i write it this way, so that the variable is outside everything is fine with saxon.

  <xsl:function name="mt:check_the_next">
    <xsl:param name="kind"/>
    <xsl:param name="lemma"/>

<xsl:variable name="translation_adja" select="mt:lexicon_adjectives('texanisch')"/>

    <xsl:choose>
      <xsl:when test="$kind = 'ADJA'">
	.	
	.
	.

</xsl:function>

But if i write it this way,

  <xsl:function name="mt:check_the_next">
    <xsl:param name="kind"/>
    <xsl:param name="lemma"/>

    <xsl:choose>
      <xsl:when test="$kind = 'ADJA'">

<xsl:variable name="translation_adja" select="mt:lexicon_adjectives('texanisch')"/>
.
.
.


</xsl:function>


so that the variable is inside my when element saxon does nothing.
It just tells me the following:
Warning: at xsl:variable on line 22 of file:/Users/jeckyll/studium/au/ project/norman/norman_neu.xsl:
SXWN9001: A variable with no following sibling instructions has no effect



I don't know what to o because the failure that there are no siblings is not correct i think because the value is choosen.


Pleas help me xsl-List members :) I need that variable inside my when element so i can use a different function then inside another when element.

What am i doing wrong ?


cheers,


norman

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.