[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Is there a better way to produce a single html via

Subject: Re: Is there a better way to produce a single html via XSLT from multiple xml files ?
From: Kamal <kbhatt@xxxxxxxxx>
Date: Sun, 23 Mar 2008 12:10:35 +1100
Re:  Is there a better way to produce a single html via
Z W wrote:
Kamal
Thanks for your answers. The stuff I need to get done is somewhat more
complicated
than what I posted here. With sleepless night, experimenting, I think
I made some
progress before I got your response. But I'm still stuck at this problem.

How do I make an ant <xslt> call that accepts 2 different input xml
files in different directories
such that the xsl could know which file with for-each to perform calculations.


Inside y.xsl <xsl:for-each select="/testResults/*[not(@label = preceding::*/@label)]">

From Ant x.xml file
<xslt style="detail.xsl"
	  		in="C:\test_report\test_input_3.jtl"
	  		destdir="C:\test_report"
	  		basedir="C:\test_report"
	  		out="C:\test_input_3.html" 		
	  		force="true">
			<param name="currentJTL" expression="C:\test_report\test_input_3.jtl"/>
			<param name="previousJTL" expression="C:\test_input.jtl"/>
			<param name="curBuildVersion" expression="${currentBuildVersion}"/>
			<param name="pBuildVersion" expression="${previousBuildVersion}"/>
			<param name="latestDir" expression="${Detail_latestTPSDir}"/>
			<classpath location="C:\apache-ant-1.7.0\lib\saxon9.jar" />

Is there a way where I could include with for-each specifying to
include a specific file.
I want to make use of currentJTL and previousJTL as you can see above
in Ant xml file but
the xsl could only interpret file from in="C:\test_report\test_input_3.jtl".

How do I do what you suggested earlier ?
If I understand correctly, you want to query on currentJTL and previousJTL. You had code that did that (using document). What you may have been missing is the <xsl:param name="currentJTL"/> and <xsl:param name="previousJTL"/> at the start of your file. Before you define any templates, put those values in the file. As you are using absolute path, this should work.

Alternatively, you can combine all three files into a mega XML file, but that is probably not what you need.
b) Because of (a), I thought I should make 2 separate calls to the
same xls for the 2 xml files, whose outputs are html files
But this create the problem to find a way to combine these 2 html files.

Is there a better way to do this - ie could I just use a single xsl
and produce results from 2 different xml inputs
I have also posted an earlier question about min, max problem.

Thank you very much for your help.


In one of your other posts, you mention you are using Ant.

My recommendation here (if it is still relevant) is to not try and combine two HTML outputs, but combine the inputs. You mentioned using Ant, I would have a two pass process, first pass combines the two files into one, the second parse does whatever you really want to do. I do something similar with XSDs. It shouldn't be too hard to do. As I said, don't know if you need to actually do that.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.