I need to remove all \[code\]Component\[/code\] elements and their corresponding \[code\]ComponentRef\[/code\] elements, where the \[code\]Component\[/code\] child element \[code\]File\[/code\] attribute \[code\]Source\[/code\] is NOT a \[code\]dll\[/code\] file?
I have the evaluation function for the \[code\]Source\[/code\] string value i.e. \[code\]{substring(wix:File/@Source, string-length(wix:File/@Source) - 2)}='dll'\[/code\] returns true for \[code\]Source\[/code\] values that contain \[code\]dll\[/code\]
But I don't know how to use the function to remove the last two \[code\]Component\[/code\] elements (with their children) as well as the corresponding last two \[code\]ComponentRef\[/code\] elements (mapped by \[code\]Id\[/code\] attribute)?
This XSLT does not work in many ways, firstly the second \[code\]match\[/code\] complains, and I'm not sure what is wrong with the expression..
Even if that worked, how would you always retain \[code\]DirectoryRef\[/code\] while removing the mismatching \[code\]Component\[/code\] and child \[code\]File\[/code\] elements?
Removing the corresponding \[code\]ComponentRef\[/code\] elements is missing altogether?