ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Michael" <Michael_Br...@jdedwards.com>
Subject RE: XSLT issue with sending a parameter through javascript....
Date Fri, 31 May 2002 19:24:27 GMT
Here is my snippet of code, not very refined and I have been logging to
debug as I go.  Let me know if there is more needed but this is the looping
being executed.

	for(x = 0; x < ptypes.length; x++){
	
basedir=InitRetrieval.getProperty("basedir");
	            	outval[x]=("retrieval" + x + ".xml");
	            	outvalfile=(basedir + "/" + outval[x]);
	            	var outfile= new File(outvalfile);
	            	inval =("OW" + ptypes[x] + "_Paths.xml");
	            	invalfile=(basedir + "/" + inval);
	            	var infile = new File(invalfile);
		  		pstyle = InitRetrieval.createTask("style");

				pstyle.setStyle("retrieval.xsl");
				pstyle.setExtension(".xml");
				pstyle.setProcessor("xalan");
				pstyle.setIn(infile);
				pstyle.setOut(outfile);
				pstyle.setForce(true);
				pstyleparm=pstyle.createParam();
				pstyleparm.setName("platform");
InitRetrieval.log(pstyleparm.getName());
InitRetrieval.log(pstyle.params.size());
	
pstyleparm.setExpression(InitRetrieval.getProperty("jde.osrunning"));
				check = pstyle.params.firstElement();
InitRetrieval.log(check.getName());
InitRetrieval.log(check.getExpression());
InitRetrieval.log("Done Param.setExpression");

				pstyle.execute();
					}

Here is the xml that does work....

	<target name="createServer" if="jde.serverside">
	 <style basedir="." destdir="." 
	  			extension=".xml" 
	  			style="retrieval.xsl" 
	  			in="OWSystem_Paths.xml"
	  			out="retrieval.xml" 
	  			processor="xalan">
	  	<param name="platform" expression="'${jde.osrunning}'"/>
	 </style>
	 <available file="./retrieval.xml" property="retrieve.file.exists"/>
	 <antcall target="doRetrieval">
	    <param name="retrievefile" value="retrieval.xml"/>
	 </antcall>    
	</target>

Mike B.

-----Original Message-----
From: Diane Holt [mailto:holtdl@yahoo.com]
Sent: Friday, May 31, 2002 12:25 PM
To: Ant Users List
Subject: Re: XSLT issue with sending a parameter through javascript....


--- "Brown, Michael" <Michael_Brown@jdedwards.com> wrote:
> When I transfer the code into JS then it doesn't
> send the parameter.  Any ideas????

I think you'd need to post your <script> (or at least the relevant parts).

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message