Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
XSL で文字列式を評価する方法はありますか?
例:
<myItem id="1"> <validator expression="$someVariable = '3'" /> </myItem> ... <xsl:variable name="someVariable" select="3" /> <xsl:if test="@expression"> ...
この構文が思い通りに機能しないことはわかっていますが、テスト式を変数に格納してから式を評価する方法はありますか?
Michael Kay (XSLT 2.0 and XPath 2.0, 4th ed. p 1210) によると、動的評価は XSLT 2.0 に組み込まれませんでした。
dyn:evaluate()EXSLT にも機能があり、Saxon でも実装されています。
dyn:evaluate()