Hi all,
I would like to ask a couple of questions about XSL transformation of XML -file. I've tried to look examples, but unfortunately not found any specifically for these issues.
1)
I have the following kind of XML -logfile (rough example):
I use XSL to transform this XML to HTML. I would like to gather summary about the tests (how many passed, failed etc.) and their sub-tests and eventually maybe show this summary on top of the file and then make hyperlink to the actual test data lower on the converted HTML.
I was wondering if it's possible to gather summary with XSL, since the templates will transform the file sequentially. Or is there a way.
2) Is it possible to somehow bind two (or) more XSL stylesheets in one XML -file and show e.g. a menu, from which the user could choose an action, e.g. one could show whole log and the other only summary?
Any tips or links would be appreciated. Thank you in advance.
I would like to ask a couple of questions about XSL transformation of XML -file. I've tried to look examples, but unfortunately not found any specifically for these issues.
1)
I have the following kind of XML -logfile (rough example):
Code:
<testlog type="Device testlog">
<selftests name="Self tests">
<test name="Memory test">
<subtest name="Shared RAM">
... some test data here ...
<result value="PASSED" />
</subtest>
<subtest name="Video memory">
... some test data here ...
<result value="FAILED" />
</subtest>
<result value="FAILED" />
</test>
<test name="Led test">
...
<result value="PASSED" />
</test>
</selftests>
</testlog>
I use XSL to transform this XML to HTML. I would like to gather summary about the tests (how many passed, failed etc.) and their sub-tests and eventually maybe show this summary on top of the file and then make hyperlink to the actual test data lower on the converted HTML.
I was wondering if it's possible to gather summary with XSL, since the templates will transform the file sequentially. Or is there a way.
2) Is it possible to somehow bind two (or) more XSL stylesheets in one XML -file and show e.g. a menu, from which the user could choose an action, e.g. one could show whole log and the other only summary?
Any tips or links would be appreciated. Thank you in advance.