call-template要素のname属性でXpathを使用できないようです。どうすればこの問題を回避できますか?どんな助けや考えも素晴らしいでしょう!XSLT呼び出しテンプレートの名前属性
<xsl:for-each select="child::knomaddb/Content/Videos">
<xsl:result-document method="xhtml" href="{local-name()}.html">
<html>
<body>
<h1>Knomad</h1>
<h2>{local-name()} Videos</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Video</th>
<th>Description</th>
<th>Comments</th>
</tr>
<xsl:for-each select="Video">
<xsl:call-template name="{ancestor::local-name()}"/>
</xsl:for-each>
</table>
</body>
</html>
</xsl:result-document>
</xsl:for-each>
問題を解決するために適用テンプレートとテンプレートルールを試したことがありますか? call-template命令は、name属性のxpath式を受け入れません。明示的に名前を設定する必要があります。 – riff
XPath式ancestor :: local-name()は有効なXPath式ではなく、おそらく複数の名前を選択する場合は、xsl:apply-templatesを再作成しようとしているようですが、ノードには複数の祖先があるためです。 –