I have following xml:
<root>
<product>
<some-another-tag>45</some-another-tag>
<provider>1</provider>
</product>
<product>
<some-another-tag>45</some-another-tag>
<provider>2</provider>
</product>
<product>
<some-another-tag>45</some-another-tag>
<provider>3</provider>
</product>
<product>
<some-another-tag>45</some-another-tag>
<provider>1</provider>
</product>
<product>
<some-another-tag>45</some-another-tag>
<provider>8</provider>
</product>
</root>
Using xsl transform I want to remove whole <product>
tag if there is <provider>1</provider>
in it.
How can I build such template?
In general, if you want to remove certain elements then you start with the identity transformation template and add empty templates matching those elements you want to remove, see http://xsltransform.net/pPzifpk which does: