suppose i have this xml:
amit
/abc/kk/final.c
&
This transformation:
when applied to the provided XML document:
amit
/abc/kk/final.c
22
sumit
/abc/kk/up.h
23
nikhil
/xyz/up.cpp
24
bharat
/abc/kk/down.h
25
ajay
/simple/st.h
27
produces the wanted, correct result:
amit
/abc/kk/final.c
22
sumit
/abc/kk/up.h
23
bharat
/abc/kk/down.h
25
Explanation:
A template matching any student
having a file
child whose string value starts with '/abc/kk'. This just puts the generated contents in a wrapper tr
element.
A template matching any student
that has no body and effectively deletes it (doesn't copy this element to the output). This template has a lower priority than the first one, because the first one is more specific. Therefore, only student
elements that are not matched by the first template are processed with the second template.
A template matching any child element of any student
element. This just wraps the content into a td
element.