ページ内のラジオ ボタン (都市を表す) を選択すると、XSLT Sitecore で都市の機関のリストを表示する必要があるラジオ ボタン リストに取り組んでいます。ここでは、外部 Web サービスから機関のリストを取得するので、都市の一意の ID (ラジオ ボタンの値として保存される) として Web サービスに渡す必要があります。以下は、同じことをするために使用しているコードです。
<xsl:variable name="city" select="sc:GetCityUniqueID()"/>
<xsl:variable name="ID" select="sc:item($city,.)" />
<table cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<!--In the SiteCore Content Tree we are maintaining Institutions as Child Nodes to Cities.So using for each I am populating radio buttons with those many institutions under a city.Here Please note that I am setting Value to the ID which I need to pass to the Helpwr Function sc:GetInstitutions below-->
<xsl:variable name="cities" select="$content/child::item[@template='city institution details']"/>
<xsl:if test="$cities " >
<xsl:for-each select="$icities" >
<xsl:variable name="current" select="."></xsl:variable>
<input type="radio" Groupname="citylist">
<xsl:attribute name="id" >
city<xsl:value-of select="position()"/>
</xsl:attribute>
<xsl:attribute name="name" >city</xsl:attribute>
<xsl:attribute name="value" >
<sc:text field="Institute ID" select="$current" />
</xsl:attribute>
</input>
<span class="chooseCity">
<sc:text field="Name" select="$current" />
</span>
<br/>
</xsl:for-each>
</xsl:if>
</td>
</tr>
</table>
<div class="institution_results">
Institutions are:
</div>
<div class="paddAll">
<!--Here 123456 should be the selected radio buttons value above,which I am passing to external webservice call done in the helper to populate Institutions-->
<xsl:value-of select="sc:GetInstitutions('123456’)" disable-output-escaping="yes"/>
</div>
ここで直面している問題は、選択したラジオ ボタンの値を XSL ヘルパー関数に渡して機関のリストを取得し、その結果を下の同じページに表示する方法です。
どんな提案も役に立ちます。