I have, this xml lookup table:
<lookup>
<Codes>
<code>123<code>
</Codes>
<Codes>
<code>321<code>
</Codes>
</lookup>
and document:
<document>
<header>
<remarks>test</remarks>
</header>
<Line>
<Line-Item>
<code>123</code>
</Line-Item>
<Line-Item>
<code>444</code>
</Line-Item>
<Line-Item>
<code>321</code>
</Line-Item>
</Line>
</document>
There is possible, to check document codes with lookup table codes, and if document code=lookup code, delete Line-Item from document.
answer should be:
<document>
<header>
<remarks>test</remarks>
</header>
<Line>
<Line-Item>
<code>444</code>
</Line-Item>
</Line>
</document>
I’m stuck on xsl:stylesheet version=”1.0″.
Best regards 🙂
This transformation:
when applied on the provided XML document:
produces the wanted, correct result:
If the document is this:
then again the correct result is produced (note that no
Lineelement is output at all):