Solved

how to combine 3 xlst into 1 xslt

Posted on 2011-09-27
8
331 Views
Last Modified: 2013-11-18
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
0
Comment
Question by:nkk1712
  • 5
  • 3
8 Comments
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 36707964
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
 

Author Comment

by:nkk1712
ID: 36708397
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
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 36708573
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
 

Author Comment

by:nkk1712
ID: 36709035
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 60

Assisted Solution

by:Geert Bormans
Geert Bormans earned 500 total points
ID: 36709535
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
 

Author Comment

by:nkk1712
ID: 37146679
I've requested that this question be deleted for the following reason:

i can not share &nbsp;the xslt doc
0
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 37146680
advice was given on how to solve this.
I consider the question answered.
Deletion is not an option
0
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 37152576
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

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now