以下のXSLTを使用して入力フィールド値をフェッチしたいのは例です:
例:http ://www.w3schools.com/xsl/tryxslt.asp?xmlfile = cdcatalog&xsltfile = tryxsl_if
xsltコードを次のように置き換えます。
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited by XMLSpy® -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<xsl:template match="/">
<html>
<body>
<input type="text" name="testTextBox" value="testValue"/>
value here -->> <xsl:value-of select=".//x:TextBox[@Name = 'testTextBox']" />
<h2>My CD Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Artist</th>
</tr>
<xsl:for-each select="catalog/cd">
<xsl:if test="price>10">
<tr>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="artist"/></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
次に、下に入力フィールドが表示されます-したがって、私の要件は次のようになります。
- テキストユーザーが入力フィールドに書き込んだものは何でも、その入力フィールドの前にXLTを使用してその値を表示したいと思います。
ありがとうスシル