I am trying to transform XML file twice with different XSLT files (Two step view). Is it possible to do so?
Example:
data.xml -> transformed by first.xsl -> result of first transformation (XML) -> transformed by second.xsl -> result of second transformation (HTML)
Unfortunately, with standards-compliant XSLT 1.0: no, this is not possible.
In XSLT 2.0, a template’s return value may be used as input to another template; so an upgrade to XSLT 2.0 (which is easier to work with on many other fronts as well) would solve this limitation for you.
Another workaround is using the
node-setextension function: but, being non-standard, this is obviously not supported everywhere identically: see http://www.xml.com/pub/a/2003/07/16/nodeset.html for details.