how to combine 3 xlst into 1 xslt

Hi,

Please find the attachments,
Here to run my application the same input file I’m giving 3 times to application as step1 step2 step3[environment: spring batch].
Which is now taking more time…? How can I merge these three steps into a single step.
Currently  
Step1 I’m using DB and converting some amounts
Step2 using these db data I’m aggregating
Step3 using db data and step2 aggregated data
conversion.JPG
conversion1.JPG
nkk1712Asked:
Who is Participating?
 
Geert BormansInformation ArchitectCommented:
So you are pipelining
Much of the time will be lost in accessing the files and building the tree models.
So there is indeed a good chance that you will need less time when the three XSLT's are combined into one
How that needs to be done depends on the XSLTs itself... please share

There is a second optimisation.
If you could use XSLT2, you could access all the files as one collection
Then you only need one transform, meaning you only need to launch the JavaVM once for the entire set

So, XSLTs please, a source XML example and an answer to the question: "can you use Saxon 9.3 for XSLT2?"
0
 
Geert BormansInformation ArchitectCommented:
Don't you think this is a little vague as a question?

If this is a pipeline you are setting up, please realize that sometimes it is good to have a series of simple XSLTs instead of one complex.
But from the information you give I know nothing.
I can't relate the images you show to XSLT functionality.

So, you need to give more info.
What are the XSLTs doing. How is the process now (a pipeline or three parallel transforms, if the later, how do you merge the result data)

0
 
nkk1712Author Commented:
Okay …
I know it’s difficult to understand. But I’ll try.

I’m having input *.xml file [150-160 files 1.64 GB] for each step will I  have run all these input xml files
Here I observed one thing, my logic part what I showed in images is taking very less time, the most  time is taken for coping rest of part. Somehow if I change these 3 steps into one step then I can get what I’m looking at.
Anyway
In step1
           I’m converting amounts using DB
            USD to EUR
            GBP to USD
In Step2
      I’m aggregating these converted amounts for specific codes
In Step3
      I’m using these aggregation amounts

here for each step i am using one xslt, please find the attachment

conver.ppt
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
nkk1712Author Commented:
sorry :)  i can not share my xslt files

im using Saxon 9.0.0.5
my environment java, spring-batch, hibernate,jpa.

can you tell me the second one , with an example.
0
 
Geert BormansInformation ArchitectCommented:
You ask on an open forum to help you integrate 3 XSLTs into 1 XSLT
and then you can't share the XSLTs???

Well, strange indeed, then I can't share my solution for this :-)

As an independent consultant I imply non disclosure with everything that is sent to me.
Maybe you can email the XSLTs, so I can look at them and still keep them confident
(email address in my profile)

about dealing with the 160 files in one go try this

<xsl:for-each select="collection('file:///c:/source-dir/?select=*.xml')">
  <!-- apply templates here, with a mode for the processing of the file -->
</xsl:for-each>

use result document for writing to a file with the same name in a different location

Best is to integrate the processing of the three XSLT whilst you walk the tree, if possible.
If that is not possible, you can always store the result of an XSLT in a variable and apply-template that variable to the next mode
For that you need to carefully add modes to each template

Make sure XSLT version is set to 2.0 for all of this

Can I suggest that you upgrade saxon by the way?

This is as far as I can go without seeing teh XSLTs
0
 
nkk1712Author Commented:
I've requested that this question be deleted for the following reason:

i can not share &nbsp;the xslt doc
0
 
Geert BormansInformation ArchitectCommented:
advice was given on how to solve this.
I consider the question answered.
Deletion is not an option
0
 
Geert BormansInformation ArchitectCommented:
closing recommendations:
accept: http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/XML/XPath/Q_27342994.html#a36709535
assist: http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/XML/XPath/Q_27342994.html#a36708573

In my latest answer (suggested for accept)
I explain the process of integration plus the process of pulling multiple source files at the time.
More detail can not be given due to lack of the original XSLT.
The original question is answered as good as possible lacking further input from the question poster
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.