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

Re: required parameter

Subject: Re: required parameter
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Tue, 18 Oct 2011 16:39:11 +0100
Re:  required parameter
2011/10/18 Merrilees, David <David.Merrilees@xxxxxxxxxxxx>:
> Hi
>
> I have an XSLT problem I don't understand. I pass a value in a parameter to
a template like so:
>
> <xsl:template match="/" as="element()">
>       <div id="languageOption">
>              <xsl:sequence select="model:model/model:LanguageOptions" />
>              <xsl:apply-templates select="f:action-form('fLanguage', 'Set',
'Language', 'post')" mode="helper">
>                     <xsl:with-param name="language-options"
select="model:model/model:LanguageOptions" />
>              </xsl:apply-templates>
>       </div>
> </xsl:template>
>
> Which is matched by this template:
>
> <xsl:template mode="helper" match="form[@id = 'fLanguage']">
>       <xsl:param name="language-options" required="yes"/>
> </xsl:template>
>
> and I get the error: 'No value supplied for required parameter
$language-options'. Problem is, if I remove the required attribute, the line
'<xsl:sequence select="model:model/model:LanguageOptions" />' works fine.
>
> Input XML looks like this:
>
>       <model:LanguageOptions>
>              <model:SelectListItem>
>                     <model:Selected>false</model:Selected>
>                     <model:Text>Hesky</model:Text>
>                     <model:Value>cs-CZ</model:Value>
>              </model:SelectListItem>
>              <model:SelectListItem>
>                     <model:Selected>true</model:Selected>
>                     <model:Text>English</model:Text>
>                     <model:Value>en-GB</model:Value>
>              </model:SelectListItem>
>       </model:LanguageOptions>
>
> Any bright ideas?

What does f:action-form('fLanguage', 'Set', 'Language', 'post') return?

--
Andrew Welch
http://andrewjwelch.com

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.