I have an XML from which i need to build a condition. I am able to do it. But iam thinking to modularize it. While i try to do that i have some problems.
I use the following XSLT
In the sample xlst i had handled the Tag <Status>.It works fine.I can do the same for the Rest of the Predicates in the same way. But i am think of handling each predicate <Days>,<Region> using a seperate Template. So it would be easy to maintain in the future. The problem i am facing i am not able to select Predicate. For eg. if i want to handle the predicate <Staus> i need to pass the following tag
to the handling template. This is because Predicate can contain Operator. Is there any way to do it?
Thanks Paul for reading my post. I am trying to modularize the xslt. I want to hadle each predicate(eg, Days,Region) in a seperate template. For eg. i want to pass the below node to my template and handle it there. <Predicate> <Days> <Min>10</MIN> <Max>20</MAX> </Days> </Predicate>
I am looking for the method to select this entire node and pass it to the template to handle it.
I am a bit confused by your procedural terminology. You don't select elements and pass them to templates. You declare templates and arrange things so that the templates will be executed. In this particular example:and in your template that matches the root element:This sort of example appears pretty early on in just about every XSLT reference book.