0
apply-templateを使用して要素webのすべての子要素に属性webを追加しようとしています。apply-templatesを使用してすべての子要素に属性を追加する
ソースXML
<p></p>
<tabel>
<tr>
<td>
<web>
<p></p>
<p></p>
</web>
</td>
</tr>
<tr>
<td>
<web>
<p></p>
<ul>
<li></li>
<li></li>
</ul>
</web>
</td>
</tr>
</tabel>
ターゲットXML
<p></p>
<tabel>
<tr>
<td>
<p class="web"></p>
<p class="web"></p>
</td>
</tr>
<tr>
<td>
<p class="web"></p>
<ul class="web">
<li></li>
<li></li>
</ul>
</td>
</tr>
</tabel>
私のXSL
<xsl:template match="p">
<p>
<xsl:apply-templates/>
</p>
</xsl:template>
<xsl:template match="web">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="ul">
<ul>
<xsl:apply-templates/>
</ul>
</xsl:template>
は、テンプレートを適用し、Webのすべての子要素に属性ウェブを追加するためのいずれかの可能性があります? 誰もが、どのようにこれを行うアイデアを持っていますか? 整形入力などを考える
あなたが私たちに示したソース文書は整形式のXMLではありません。 –