This is a sample XML file.Actually there might be lot of XMLs.
In the XSL I wrote, I want to incorporate a logic through which I can
filter out all those XML files in which responseCode is not 0.All the
Select only those sampleResult elements that match that condition.
XML files in which the responseCode is 0 ,then xml filename should be
written in a text file say textA.txt.
All the XML files in which any responseCode is not 0,then xml filename
should be written in a text file say textB.txt.
Unfortenately XSLT doesn't allow you to write to external files. You can go
around this by:
1. using XSLT 2.0 <http://www.w3.org/TR/xslt20/#creating-result-trees>,
2. using extensions elements that allow you to create additional result
documents, e.g. <http://exslt.org/exsl/elements/document/index.html>, or,
3. calling the transformation twice with a parameter to define which response
codes you want.
Check if your processor supports 1 or 2, and if it doesn't, then 3 is your only
MoreOver in the XSL code you sent me, can you tell me how to
You can't. There is no XSLT instruction that allows you to do that, except if
you use either 1 or 2 of the above list.
It would also be nice if we can filter out the HTML files generated
through XSL instead of XML logs.
I don't understand.
Hope you might get what I want to perform :-)
Please help me to provide the solution.
Choose your approach based on the capabilities of you XSLT processor, then come
back if you run into problems.