我有如下表格
<form method="get" action="change" target="frame">
<select name="fill" >
<option>red</option>
<option>green</option>
<option>yellow</option>
<option>pink</option>
</select>
<input type="submit" value="darstellen"/>
</form>
<iframe name="frame">
</iframe>
我希望表单将颜色发送到另一个包含矩形的 XSL 文件。到目前为止,将颜色传递给另一个 XSL 文件是可行的,但现在我想动态更改矩形的填充颜色,但使用传递的参数不起作用。
<map:match pattern="change">
<map:generate src="square.svg"/>
<map:transform src="recchange.xsl">
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:serialize type="html"/>
这是我的站点地图
<xsl:param name="fill"/>
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<body>
<h2><xsl:value-of select="$fill"/></h2>
<h1>testtest</h1>
<svg>
<rect width="300" height="100" style="fill:$fill;stroke-width:3;stroke:red">
</rect>
</svg>
这就是我到目前为止所尝试的。有人有建议吗?