Paul Clapham wrote:Well, displaying the XSLT code as a concatenation of Java strings is kind of an odd thing to do, but as far as I can see you've already done what I suggested. There's what looks like the identity transformation at the beginning, and then there's a template which does something with elements which look like <Items type="INOUT">. So that's a good start.
Now, your problem is that you want to drop some <Item> elements which satisfy some condition? Then you write another template which matches <Item> elements. If the element satisifes the condition, then write out the element and inside it you do xsl:apply-templates.
And if I were you I would put that XSLT code into its own file, rather than mixing it up with Java code like that. Easier to maintain, especially having to make sure you do the quotes and apostrophes right.
Paul Clapham wrote:When your requirements say "I want the output to look just like the input except..." then your starting point is an identity transformation. Then add templates which do the specific modifications you're interested in.
Tiya Khambadkone wrote:Do you know any tool to transform XML to another XML using XSLT ?
Jayant Kaushal wrote:
when will we use FilterDispatcher and when StrutsPrepareAndExecuteFilter.
i read that FilterDispatcher is being depreciated.Can someone shed some light.
Thanks in advance.