3
私は奇妙な行動を見ました。次 は詳細です:別のテンプレートで使用すると、アイデンティティ変換の変な動作
XSLTコード
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:template match="child[@include='1']"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
ソースXML
<?xml version="1.0" encoding="UTF-8"?>
<Parent>
<child include='1'>
<Attribute>Attribute1</Attribute>
</child>
<child include='1'>
<Attribute>Attribute2</Attribute>
</child>
<child include='0'>
<Attribute>Attribute3</Attribute>
</child>
<child include='0'>
<Attribute>Attribute4</Attribute>
</child>
</Parent>
そして、私の結果は次のとおりです。
我々は結果が条件にacccording以下のようにする必要があります適用され、通常の状態にAcoording<xsl:template match="child[@include='1']"/>
<Parent>
<child include="0">
<Attribute>Attribute3</Attribute>
</child>
<child include="0">
<Attribute>Attribute4</Attribute>
</child>
</Parent>
うまくいけば、私は詳細に説明している
:私はあなたが上のあなたの期待をベースに何かわからないSample Code
ありがとう@マイケル、これは私が探していたものです:) – Hikmat