我想用下面XSLT是例获取输入费尔德值:如何使用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>
那么下面你将看到输入字段 - 所以我的要求是这样的:
- 什么文本用户在输入字段中写我想显示值使用g输入栏前面的XLT。
感谢 苏希尔
有益尝试初学者虽然,所以+1 –
请,包括源XML文档(不只是重定向),并指定确切想从转型的结果。 w3schools不是一个很好的XSLT学习网站 - 看看为什么在这里:http:www.w3fools.com –
Dimitre是对的! @Sushil,我已经做了小版本的代码,它将从文本框中复制文本到跨区域..但是我恐怕它不能在W3Schools中尝试它的窗口.. –