You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by "Jacob, Raymond A Jr" <ra...@navy.mil> on 2006/12/06 05:50:40 UTC

Thank you: Newbie Question Answered: Can you have more than on input file on the java command line?

Messrs: McDougald and keshlam
Thank you for your patience.
Thank you for your time.
Thank you for making work. As I said I am a Newbie, so your example was
a little terse for me and required me to do
 a little research in order to solve my problem. I appreciate you
helping me further my limited knowledge of xsl.

Thank you again,
Raymond

-----Original Message-----
From: Bruce McDougald [mailto:bmcdougald@hotmail.com] 
Sent: Tuesday, December 05, 2006 13:58
To: Jacob, Raymond A Jr
Subject: Re: Newbie Question: Can you have more than on input file on
the java command line?

I don't think you can specify more than one input file on the command
line.  However, since you are processing all three xml files with the
same style sheet, why not simply open the other two files from within
the stylesheet?
 
 
In your stylesheet do something like:
<xsl:variable name="file1">scans\SCANS_~2.XML</xsl:variable>

<xsl:variable name="file1">scans\SCANS_~3.XML</xsl:variable>

...

<xsl:apply-templates select="document($file1)" />  <!-- call a template
to process the scan2 xml file -->

<xsl:apply-templates select="document($file2)" /> <!-- call a template
to process the scan3 xml file -->

 ...
-----Original Message-----
From: keshlam@us.ibm.com [mailto:keshlam@us.ibm.com] 
Sent: Tuesday, December 05, 2006 13:23
To: Jacob, Raymond A Jr
Cc: xalan-j-users@xml.apache.org
Subject: Re: Newbie Question: Can you have more than on input file on
the java command line?

Not that way, no.

You can write your stylesheet to take parameters and to use the
document() function to retrieve additional files. Or to take a control
file and extract the URIs it provides for use with document(). 

______________________________________
"... Three things see no end: A loop with exit code done wrong, A
semaphore untested, And the change that comes along. ..."
-- "Threes" Rev 1.1 - Duane Elms / Leslie Fish
(http://www.ovff.org/pegasus/songs/threes-rev-11.html) 



	----- Original Message ----- 
	From: Jacob, Raymond A Jr <ma...@navy.mil>  
	To: xalan-j-users@xml.apache.org 
	Sent: Tuesday, December 05, 2006 11:51 AM
	Subject: Newbie Question: Can you have more than on input file
on the java command line?




	I have three xml files that I  transform individually using the
bat file below and put the results in a single file. 
	-----------------transform1.bat------ 
	java -cp
c:\xmlapps\xalan-j\xml-apis.jar;c:\xmlapps\xalan-j\xercesImpl.jar;c:\xml
apps\xalan-j\xalan.jar org.apache.xalan.xslt.Process -IN
scans\SCANS_~3.XML  -XSL discov.xsl -OUT discov3.txt

	java -cp
c:\xmlapps\xalan-j\xml-apis.jar;c:\xmlapps\xalan-j\xercesImpl.jar;c:\xml
apps\xalan-j\xalan.jar org.apache.xalan.xslt.Process -IN
scans\SCANS_~2.XML  -XSL discov.xsl -OUT discov2.txt

	java -cp
c:\xmlapps\xalan-j\xml-apis.jar;c:\xmlapps\xalan-j\xercesImpl.jar;c:\xml
apps\xalan-j\xalan.jar org.apache.xalan.xslt.Process -IN
scans\SCANS_~1.XML -XSL discov.xsl -OUT  discov1.txt

	copy discov1.txt+discov2.txt+discov3.txt discov.txt 
	---------------------------------------------- 

	I would like to know how or if it is possible to do this on one
line? 
	I tried: 
	java -cp c:\xmlapps\xalan-j\... -IN scans\SCANS_~1.XML -IN
scans\SCANS_~2.XML -IN scans\SCANS_~3.XML  -XSL discov.xsl -OUT
discov3.txt

	 and it did not work. 

	Thank you, 
	Raymond