Merge all XSL files

I am using XSL/JSP to design the Application Form.
Now I want to split header, sidebar, footer and
app form into 4 XSL files, only app form will receive dynamic data from XML, the rest are static pages.
One way I can think of is using 5 JSPs to process
E.g.
     ApplicationForm.jsp
     ->Header.jsp     -> Header.xsl
     ->sidebar.jsp     -> Sidebar.xsl
     ->Footer.jsp     -> Footer.xsl
     ->Form.jsp     -> Form.xsl
But this method may be very expensive as each JSP has to invokes XSLTProcessor.process()
How can I process these XSL files better in term of performance?
Can I merge all XSL files into one first?
Albert KT Tan

Hello,
I'm not exactly sure I get what you're looking for.
What I was suggesting was one jsp calling a Java Class 5 times and outputting the XML string translated to HTML in their proper places.
You're going to have 5 input xml files, so no matter what you're going to have to do 5 translations, right? If so what's the difference if you pass the same xsl to each translation or 5 different ones? Is this the part I'm confused on?
You could do it like this too.
<%
//The class that does the translations
ApplyXML ax = new ApplyXML();
String header = ax.apply(xmlFilePathHeader, xslFilePathHeader);
String sidebar = ax.apply(xmlFilePathSidebar, xslFilePathSidebar);
String footer = ax.apply(xmlFilePathFooter, xslFilePathFooter);
String form = ax.apply(xmlFilePathForm, xslFilePathForm);
%>
<!-- then just plug the translated strings in where you need them. -->
<html>
<body>
<table>
<tr>
<td colspan="2">
<% out.println(header); %>
</td>
</tr>
<tr>
<td>
<% out.println(sidebar); %>
</td>
<td>
<% out.println(form); %>
</td>
</tr>
<tr>
<td>
<% out.println(footer); %>
</td>
</tr>
</table>
</body>
</html>
Am I still misunderstanding?
-Mike

Similar Messages

  • How do i merge all the files in a directory into a single file

    I need to merge(or move) all the files(all are .txt files) in a directory into a single file?

    Thanks Martin, but I was searching for an inbuilt class or a stream like the SequenceInput class that could do this for me.

  • How to Merge multiple XML  files in one file ( Env: XML Publisher 5.6.2)

    All,
    I have recently started working on XML publisher and have developed 3 reports in last 2 days using XML Publisher and integrating them with Concurrent programs.
    This is a great tool.
    I have got another requirement, where i need to use xml file generated by multiple run of same report with various parameters and then merge all xml file to a single report. Developing the whole custom process will take very long time and sure will have bugs in it. Instead i was thinking to use xml file generated by Oracle report itself.
    Report "US Gross to net summary" generates xml output in standard output directory and then show output in PDF file. I have 7 such file generated for each payroll. I want to merge output of xml into a single xml so that i can create single report having data from all 7 xml files showing me All payroll output in a single report.
    Can someone please guide me , how can i read xml file data from the output directory of a seeded concurrent program and how to manipulate data in it.
    Thanks
    Ankur

    Hi Tim,
    Thanks for replying. I have looked for "PDFBookBinder class" in xml publisher user guide for ver 5.6.2. I didn't get any reference of this text. Can you please guide me to a tutorial/link where i can get more information about this class.
    Also, i originally thought of similar to your second logic, as my design basis. Oracle process generates the xml file in output directory which i can get. What i didn't get is how do i "pick them up and merge" using publisher. Also, is there way to do this merging process using pl/sql ? Can you please give little more information on your second approach.
    My original plan of action is that i will create a report set in which i will call oracle seeded report for all 7 payrolls in a sequential manner. Then using the child requests of the report set i will get to 7 xml files generated by seeded oracle process. Then the piece i am not sure of , i will use those 7 files to generate a single xml file having payroll name as tree top for each output. Once single xml is ready, i can easily design a template and register the process to generate output as Excel.This process will not require me to actually change any data or do any calculation. It will only reformatting the feilds we see and abiity to see all 7 payroll at one time rather then entering these numbers manually into an excel to do analysis.
    Please provide your feedback, if you think above plan is not feasible or need corrections.
    Best Regards,
    Ankur

  • Merging and storing files and folders on external hard drive

    Merging and storing files/folders  - I have a MacBookPro3,1 &  a MacBookAir1,1 both running OS10.6.8 and then files from backups and archives on a LaCie 250 and LaCie 500. I want to improve my productivity by merging all files/folder into one place.
    I have a WesternDigital 1T to move files/folders to and do my duplicate deletion work.
    The end result I'm seeking is to have all my files/folders stored on the LaCie 500  - with space for expanding iPhoto Library and Movies then that LaCie 500 Backed up on the 1T.   As my computers are older models the internal drives are smaller - MBA 80GB and MBP160. The Air in particular gets full up quickly and doesn't work efficiently.
    What steps/software have you had experience with, and would recommend to merge all my files/folders, delete duplicates, and get it all in one place - including iTunes, iPhoto. 
    What are the pros and cons of keeping & working with files/folders on an external drive rather than on the internal drive?
    I'm aware of sluggishness in iPhoto if the library is too large, and looked into iPhoto Library Manager as an option for my photos.
    Thanks in advance for your help with this way past due Spring cleaning activity.

    Plugins have to be in specific locations for the application to load them. If you're just storing plugins you're not using you can store them anywhere.

  • I recently upgraded my old powerbook to an iMac.  I've dumped the files of my backup drive into the new iMac. Is there a way to have access to all the files (new and old computers) when logged on as the same user vs. logging in and out to access each?

    I am new to posting to this support community but have often referred to it for answers.  So thank you all who've contributed; you've been a great help!
    I recently upgraded my old powerbook to an iMac.  I've dumped the files of my backup drive into the new iMac. Is there a way to have access to/merge all the files (new and old computers) together so when I'm logged in can access all the files.
    Thanks!
    M

    Sure-glad to help you. You will not lose any data by changing synching to MacBook Pro from imac. You have set up Time Machine, right? that's how you'd do your backup, so I was told, and how I do my backup on my mac.  You should be able to set a password for it. Save it.  Your stuff should be saved there. So if you want to make your MacBook Pro your primary computer,  I suppose,  back up your stuff with Time machine, turn off Time machine on the iMac, turn it on on the new MacBook Pro, select the hard drive in your Time Capsule, enter your password, and do a backup from there. It might work, and it might take a while, but it should go. As for clogging the hard drive, I can't say. Depends how much stuff you have, and the hard drive's capacity.  As for moving syncing from your iMac to your macbook pro, should be the same. Your phone uses iTunes to sync and so that data should be in the cloud. You can move your iTunes Library to your new Macbook pro
    you should be able to sync your phone on your new MacBook Pro. Don't know if you can move the older backups yet-maybe try someone else, anyways,
    This handy article from Apple explains how
    How to move your iTunes library to a new computer - Apple Support''
    don't forget to de-authorize your iMac if you don't want to play purchased stuff there
    and re-authorize your new macBook Pro
    time machine is an application, and should be found in the Applications folder. it is built in to OS X, so there is nothing else to buy. double click on it, get it going, choose the Hard drive in your Time capsule/Airport as your backup Time Machine  and go for it.  You should see a circle with an arrow on the top right hand of your screen (the Desktop), next to the bluetooth icon, and just after the wifi and eject key (looks sorta like a clock face). This will do automatic backups  of your stuff.

  • MP4 Merge or Join Files Problem. MP4 Maximum File Size?

    I just came back from vacation with my girlfriend, and shot a bunch of home movies with my Canon 5d Mark II. The files created by the camera are MP4's.
    There are a dozen of files in total and each one is around 1 GB at 720p.
    What I want to do now is merge them together into one file. I have Quicktime Pro 7 and basically have been copying them all into one file, but once I try to copy the 8th file/chapter into the cumulative 7 previous files that are now in one continuos file, it doesn't really add anything.
    Is it not working because there is a limit on the file size of the file of an MP4? How can I make sure I merge all the files into one? Any help would be greatly appreciated.

    couldn't figure it out.

  • Merge Many PDF files in several PDF Files

    Hi,
    I have about 500 PDF Files :
    PDF_A1
    PDF_A2
    PDF_B1
    PDF_B2
    EtC.
    I want to Merge all my 500 PDF Files in 250 PDF files. I want to merge A1 with A2. B1 with B2 etc. Any idea to how to do ?
    Thank you

    Hi Dave,
    First, the issue does not exist anymore. We have decided to merge all documents in the same file. that's done and OK
    Then, Any way, I have found a solution:
    Use a script to put in different folders all files which must be together. I mean Folder A will contain files A1 and A2. Folder B will contain files B1 and B2 ...
    Then use a PDF software in command line to merge all PDF files folder by folder.
    Thnak you for your reply.

  • Merging multiple Excel files into one Numbers spreadsheet

    I am a teacher and have about 40 different Excel files. Each file has one worksheet with the name of my student and his/her grade in the 2nd column. I'd like to merge all these files into just one Numbers file. I can obviously copy/paste over and over but I'd like to find an easier way. Thanks!

    they did announce in the past few months that the NEW version, due out in a few more years I guess, will bring VBA back. not availble in an update, you will be forced to rebuy the software to regain funtionlaity that should never have been removed in the first place.
    Personally, for everything at home, I am making due without M$. just inherited an older G4 iMac, All Apple software, nothing M$ on that machine, and she works great.
    J

  • Merging 8 Flash Files

    Hi,
       There are 8 different flash files and all these flash files are being merged to a single PPT and this merged PPT is being sent for Users. As this involves repeated tasks, now there is a requirement to merge all these files to single dashboard. Each dashboard is having Panel Containers and there are many charts, tickers etc.
    1. Is this possible to merge all these 8 different dashboard? How Can I merge? I assume the performance will be affected as there will be multiple connections. Any tips to have same performance after merging (as LO connections will be more tah 8)
    2. I am thinking of using Next/Previous button options to link various dashboards, if first one fails. Which button to use to give link to another dashboard.
    Could you please help
    Regards, Nanda Kishore.

    Hi Nanda,
    It is very well possible to merge 8 separate dashboards into a single dashboard. Rather I would suggest you to call those dashboards into your main one (with the help on Image component or SWF loader with some workaround ). use a play control to give ti a dynamic display or use a next and previous button to navigate. Only problem with this approach is that every time you change it to next it will reload again (this might be annoying). To avoid this you can load all of the dashboards to separate  image components an show or hide dip-pending on the value of the play-control or the button used for transition. Benefit is that it wont load again and again rather it will load all the dashboards at once, so initially it will take some time. See which one is the best possible solution for you.
    As you said you can use buttons to dynamical display and hide the components or use the standard play control for the same.
    Let us know if you need further clarification.
    Good Luck.

  • How do I merge two accounts into one account that contains all the files from both?

    When I was running my MacBook Pro under Snow Leopard, I had one account for business that was encripted and another account that was unencripted for personal.  Now, under Lion, the whole disc gets encripted so I don't really need two acounts.  How do I merge the accounts together into one account and retain all the files from both?
    Thanks,
    Dave

    Somethinkg like these?

  • How to merge All text fiels into 1 text file to read into internal table

    Hi dudes,
      I have 3 text files in workstation. I need to everytime download these files in my internal table .
      But it takes long processing time .ie everytime it opens file read and close.
      Do u suggest for better performance for this? Like how i can meage all txt files in 1 txt file and then read once ito internal table.
      Hope i m clear to explain u my requirement.
      Gain Points

    It actually depends on your requirement(a standard answer from any SAP guy).
    Coming back to the question at hand:
    a) Can we merge these files ? My question to you :
    i) Are you downloading these to your presentation server from application server using WS_DOWNLOAD(I am using 4.5B) or CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD ?
    ii) What holds you back ?
    b) How do we parse multiple files contained in a single file ?
    Keep a delimiter which is unique only for file endings. That should do the trick.
    Regards,
    Subramanian V.

  • How do I merge multiple Excel files with more than one tab in each file using PowerQuery?

    Hello
    I have 12 Excel (.xlsx) files and each file has three identically named and ordered tabs in them. 
    I know how to merge multiple Excel files in a folder using M (those guides are all over the web) but how do I merge multiple Excel files with multiple (yet identically named and ordered) tabs? Surely it is possible? I just don't know how to do it in M.
    Cheers
    James

    What Laurence says is correct, and probably the best thing to do when the sheets have differing structures. Here is an alternate approach that works well when the sheets all have the same structure.
    When you first open the Excel file from Power Query, you can see its structure in the navigator at the right-hand-side of the screen. If you select the root (which is the filename itself) and click Edit, you'll see all the tabs in the sheet as a single table.
    You can now do filtering based on the Name, Item and Kind values. When you've reduced the set of things down to the sheets you want, select the Data column and say "Remove Other Columns". If the sheets don't have any header rows, you can just click the expand
    icon in the header and you'll be done.
    Otherwise, if the sheets have headers or if some other kind of sheet-level transformation is required against each sheet before doing a merge, you'll have to write some M code manually. In the following example, each sheet has a header row consisting of
    two columns: Foo and Bar. So the only step I need to perform before merging is to promote the first row into a header. This is done via the Table.TransformColumns operation.
    let
        Source = Excel.Workbook(File.Contents("C:\Users\CurtH\Desktop\Test1.xlsx")),
        RemovedOtherColumns = Table.SelectColumns(Source,{"Data"}),
        PromotedHeaders = Table.TransformColumns(RemovedOtherColumns,{{"Data", each Table.PromoteHeaders(_)}}),
        ExpandData = Table.ExpandTableColumn(PromotedHeaders, "Data", {"Foo", "Bar"}, {"Data.Foo", "Data.Bar"})
    in
        ExpandData

  • How to Automatically generate .XSL file of XML file ???

    Hello Everyone,
    I have UI which provide the facility to create own format by using drag and drop utility. I have also xml file which contains the data. Now task is how to automatically generate the .xsl file of the dynamically designed format for the data stored in xml form.
    If you have any idea about the solution of the above problem.
    I will thankful for any help regarding this…
    Thanks
    B. Kumar

    XSL stands for EXtensible Stylesheet Language, and is a style sheet language for XML documents. .xsl is the extension of the XSL file.Thank you, I am aware of all that.
    When we design any format by using drag & drop utility, System has to generate the .xsl file (extensible stylesheet for the xml document).Why? To accomplish what?
    And then .xsl file is used to display the data which is stored in xml document on the webpage with designed format.So you need to define the mapping between XML and HTML? and you're hoping to do that automatically?
    That's a job for a user interface designer. Not a tool.
    In brief we need to write a parson
    Parser
    which will take any designed format and generate the .xsl file for that design, to display the data which is stored in XML document.Doesn't make sense. It would make more sense if you started from a schema. Starting from an actual XML document, i.e. an instance of the schema, no, not even slightly.

  • My raid 0 crash!!!!!!  how do i merge all the data if it in parts

    my raid 0 crashed so i used Data Rescue 3 to recover all the files from both slices of the raid!!! but... i cant open none of them the raid put have the half the data on one hard drive and the rest on the other hard drive. how can i merge the file to make them one or what do i need to do to get it back up and running

    Evanrlee wrote:
    i cant open none of them the raid put have the half the data on one hard drive and the rest on the other hard drive. how can i merge the file to make them one or what do i need to do to get it back up and running
    That is exactly what RAID 0 is supposed to do. It divides your data into blocks and then write the blocks alternately to each of the disks in the RAID array. So what you are seeing is exactly what you should expect to see with RAID 0.
    To the best of my knowledge there is no way to return the data from the blocks back to the original data. Hence, the importance of backup with any kind of RAID most especially RAID 0.
    Allan
    Message was edited by: Allan Eckert

  • XSL file formatting

    XSL file formatting
    Hi there.
    I have problem with this files xsl, the problem is the output for the field date and number:
    a) `2011-05-13T21:50:00` instead of `13/05/2001 21:50:00`
    b) `.00` instead of `0`This is the output in XML:
    <xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
         <s:Schema id="RowsetSchema">
              <s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30">
                   <s:AttributeType name="myDates" rs:number="6" rs:nullable="true" rs:writeunknown="true">
                        <s:datatype dt:type="dateTime" rs:dbtype="timestamp" dt:maxLength="16" rs:scale="0" rs:precision="19" rs:fixedlength="true"/>
                   </s:AttributeType>
                   <s:AttributeType name="Net" rs:number="29" rs:nullable="true" rs:writeunknown="true">
                        <s:datatype dt:type="number" rs:dbtype="numeric" dt:maxLength="19" rs:scale="2" rs:precision="10" rs:fixedlength="true"/>
                   </s:AttributeType>
                   <s:extends type="rs:rowbase"/>
              </s:ElementType>
         </s:Schema>
         <rs:data>
              <z:row myDates="2011-05-13T21:50:00" Net=".00" />
         </rs:data>
    </xml>This output XML is generate with ASP code and saved in the csv format:
    <!-- #include virtual="/_XML/adovbs.inc" -->
    <%
    filename = "titty.xml"
    Set xmlDoc = CreateObject("MSXML2.DOMDocument.4.0")
    Set xslDoc = CreateObject("MSXML2.DOMDocument.4.0")
    %>
    <%
    sql = "SELECT * FROM tbl_login"
    Set rs = objConn.Execute(sql)
    rs.Save xmlDoc, 1
    xmlDoc.Save Server.MapPath(filename)
    rs.Close
    Set rs = Nothing
    %>
    <%
    Set oDOM = CreateObject("MSXML2.DOMDocument.4.0")
    oDOM.async = False
    oDOM.Load Server.Mappath(filename)
    Set oXSL = CreateObject("MSXML2.DOMDocument.4.0")
    oXSL.async = False
    oXSL.Load Server.Mappath("Trasform_csv.xsl")
    strTransform = oDOM.transformNode(oXSL)
    Set fso = CreateObject("Scripting.FileSystemObject")
    strPath = Server.Mappath("testme.csv")
    Set file = fso.opentextfile(strPath, 2, True)
    file.write strTransform
    file.Close
    Set file = Nothing
    Set fso = Nothing
    Set oDOM = Nothing
    Set oXML = Nothing
    Set oXSL = Nothing
    %>The XSL file:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
    xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
    xmlns:rs="urn:schemas-microsoft-com:rowset"
    xmlns:z="#RowsetSchema">
         <xsl:output omit-xml-declaration="yes"/>
         <xsl:template match="/">
              <!-- show a header by looking Schema element -->
              <xsl:for-each select="/xml/s:Schema/s:ElementType/s:AttributeType">
                   <xsl:value-of select="@name"/>
                   <xsl:choose>
                        <xsl:when test="position()!=last()">
                              <!-- xls -->
                             <xsl:text>     </xsl:text>
                             <!-- csv -->
                             <!--xsl:text>,</xsl:text-->
                        </xsl:when>
                        <xsl:otherwise>
                             <xsl:text>
    </xsl:text>
                        </xsl:otherwise>
                   </xsl:choose>
              </xsl:for-each>
              <!-- row data -->
              <xsl:for-each select="/xml/rs:data/z:row">
          <xsl:variable name="row" select="."/>
          <!-- for each column -->
                   <xsl:for-each select="/xml/s:Schema/s:ElementType/s:AttributeType">
                      <!-- display each column if it exists -->
                     <xsl:variable name="columnName" select="@name"/>
                        <!-- go through all columns and display something that matches-->
                        <xsl:value-of select="$row/@*[name()=$columnName]" />
                        <!--xsl:value-of select="translate($row/@*[name()=$columnName],'.',',')" /-->
                        <xsl:if test="position()!=last()">
                            <!-- xls -->
                             <xsl:text>     </xsl:text>
                             <!-- csv -->
                             <!--xsl:text>,</xsl:text-->
                        </xsl:if>
             </xsl:for-each>
                   <xsl:text>
    </xsl:text>
           </xsl:for-each>
         </xsl:template>
    </xsl:stylesheet>I need another output in the XML file:
    <z:row myDates="13/05/2001 21:50:00" Net="0.00" />And in the CSV file:
    13/05/2001 21:50:00, 0Can you help me?
    Thanks in advance.
    Cheers
    Edited by: user6317803 on Aug 30, 2011 1:31 PM
    Edited by: user6317803 on Aug 30, 2011 1:34 PM
    Edited by: user6317803 on Aug 30, 2011 1:36 PM

    Thanks for your answer, I use database MySQL.
    This is the solution in the ASP code:
    SELECT DATE_FORMAT(myDates, '%d/%m/%Y %H:%i:%s') myDates
             , REPLACE(NET,'.', ',') NETEdited by: user6317803 on Sep 1, 2011 9:09 AM
    Edited by: user6317803 on Sep 1, 2011 9:12 AM

Maybe you are looking for

  • Oracle 9i installation error on AIX 4.3

    Hi Dears, i am trying to install oracle 9.0.1 on iBM-AIX 4.3.but when i run runInstaller script i got the follwonig below error error in writting to directory /tmp/Oinstall. please ensure that this directory is writable and has alleast 25MB of disk s

  • How to access answer in crowdsupport

    dont know how to access mail in crowd support

  • Problems with headphone jack

    I was trying to link up to a video projector and successfully connected thru the monitor port, however when I plugged the sound cord into the headphone jack my screen immediately went black and now my headphone jack no longer works, no matter what I

  • BI Publisher Date Format

    Hi, I am building a data model using a SQL query in BI Publisher, the date format of the column in the database is DD-MON-YYYY. When I use this format in BI Publisher the query returns no results: where trim(w.date_added) = '19-MAY-2010' I have tried

  • Can I add text on the GR/GI Slip while performing MvT 313 in MB1B ?

    Hi When i use movement type 313 in Tcode MB1B, with Print and Collective Slip marked, is it possible to add a text that comes visible on the GR/GI Slip ? The text is suppose to be as an additional note to the other information on the slip. I think i