Please help me, transform to html

compiler error is: cann't compile xslt...
code is:
   public void produceHtml(String xmlPath, String xsltPath, Writer out)
            throws TransformerConfigurationException, TransformerException {
        StreamSource xsltSource = new StreamSource(new File(xsltPath));
        StreamSource xmlSource = new StreamSource(new File(xmlPath));
        StreamResult outSource = new StreamResult(out);
        TransformerFactory fac = TransformerFactory.newInstance();
        Transformer trans = fac.newTransformer(xsltSource);
        trans.transform(xmlSource, outSource);
    }xmlPath: F:\\xml\\numberFormat.xml
xsltPath: F:\\xslt\\numberFormat.xslt
out: PrintWriter instance
the two files is exist.
???

The exception is:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xml/serializer/SerializerTrace
     at java.lang.ClassLoader.defineClass1(Native Method)
     at java.lang.ClassLoader.defineClass(Unknown Source)
     at java.security.SecureClassLoader.defineClass(Unknown Source)
     at java.net.URLClassLoader.defineClass(Unknown Source)
     at java.net.URLClassLoader.access$100(Unknown Source)
     at java.net.URLClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClassInternal(Unknown Source)
     at org.apache.xalan.processor.ProcessorStylesheetElement.getStylesheetRoot(ProcessorStylesheetElement.java:121)
     at org.apache.xalan.processor.ProcessorStylesheetElement.startElement(ProcessorStylesheetElement.java:72)
     at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:623)
     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
     at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
     at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
     at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:920)
     at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:774)
     at com.myyate.thesis.htmlouput.SimpleTransform.main(SimpleTransform.java:67)
i have add xalan.jar, should i add xerces.jar?
or else error?

Similar Messages

  • Please help me transform this C++ code to java code....

    guys...please help me transform this C++ code to java code....please try to explain the code..thanks
    [program]
    #include <stdio.h>
    #define ALIVE 1
    #define DEAD 0
    #define SZ 33
    int stschk (int ,int );
    main()
    int s[SZ][SZ], i, j;
    for (i=0; i<sz; i++ ) s[0] = DEAD;
    for (j=0; j<sz; j++ ) s[0][j] = DEAD;
    s[0][1] = ALIVE;
    for (i=0; i<sz-1; i++) {
    for ( j=1;j<sz;j++ ) {
    s[i][j] = stschk(s[i][j-1],s[i+1][j];
    if(s[i][j-1]==ALIVE) printf("*");
    else printf(" ");
    printf("\n");
    int stschk(int s1,int s2)
    if(((s1==DEAD)&&(s2==ALIVE))||
    ((s1==ALIVE)&&(s2==DEAD))) return ALIVE;
    else return DEAD;

    Being picky, that's not C++, that's C. Standard headers in C++ dont' have .h after them, loop variables are scoped with the for, you use constants rather than #defines, etc..
    C and C++ both don't initialise arrays by default; you'd have to write an initialiser to get it to zero out the array:
        int s[sz][sz] = {};gcc will insert a call to memset to zero the array.
    If the author was assuming that the array was zeroed out, there would be no point zeroing the first row and column.
    The code reads values which haven't been initialised. If you mark such values explicitly undefined, and change the program to report an error when undefined, then you get several cases where the program makes such report.
    So either it' s a primitive random number generator (some random number generators use uninitialised memory as a source of randomness), or it's buggy, or it's processing undefined data and throwing away the result. Either way, it cannot be directly be ported to Java if the undefined values (which are limited to a small area of the ouput) are significant.

  • Please help -  How to export HTML file into MS word format

    How to export HTML file into MS word file without any change
    in design format?
    As I have been trying to do that but problem is coming in
    formating. Table's witdth and height get disturbed in MS word when
    I import the html file.
    What I do after creating HTML in dreamweaver I save that file
    into .txt format in dreamweaver. and then import it in MS Word. And
    I tried too much for it but invain.
    Please help me in finding the way of solution.
    Please help me as my job is in trouble. It's very urgent
    pleeease help me. I'll be thankful to you.

    Just open the HTML file in Word.
    Walt
    "apollo321" <[email protected]> wrote in
    message
    news:gavbhd$6j4$[email protected]..
    > How to export HTML file into MS word file without any
    change in design
    > format?
    >
    > As I have been trying to do that but problem is coming
    in formating.
    > Table's
    > witdth and height get disturbed in MS word when I import
    the html file.
    >
    > What I do after creating HTML in dreamweaver I save that
    file into .txt
    > format
    > in dreamweaver. and then import it in MS Word. And I
    tried too much for it
    > but
    > invain.
    >
    > Please help me in finding the way of solution.
    >
    > Please help me as my job is in trouble. It's very urgent
    pleeease help me.
    > I'll be thankful to you.
    >

  • Please help me with an html problem

    I am trying to get a one figure that I got from a jTextField to be displayed above a another figure in a different jTextField in a jTextArea. I have tried to use html whoever I have had some trouble doing so I have used the following code.
    float num1, num2, a, b, result1, result2;
            num1 = Float.parseFloat(jTextField1.getText());
               a = num1;
                result1 = a;
                    num2 = Float.parseFloat(jTextField2.getText());
                        b = num2;
                            result2 = b;
    jTextArea1.setText(String.valueOf("<html>result1<br>result2"));The code displays <html>result1<br>result2" rather than the figures that I put into the jTextFields, which I did suspect it would it also displays it on the same line, which I did not suspect. Can anbody tell me how to display the figures in the two jTextFields in the JTextArea one above the other please. Thank you.

    I guess I'll be honest with you the reason that I use a load floats is because I am very inexperienced at programming. I have only been programming for a month and have had to teach myself from books and internet documentation. I just found something that worked and repeated it over and over again and that is the reason. I know that my code looks very sloppy but it is the only way that I can do it because I am so inexperienced. The reason that I haven't learnt decent code is because I am working against the clock. I am a Freelance Macro Economist and have been working on l my own economic perspective tha could solve a lot of the economic problems in my country and some others too.
    Unfortunately it is likely that there is going to be a large recession possibly world wide (mainly due to the high levels of debt). Anyway I have to develope a new taxation system to be able to control fiscal policy on a monthly basis so that there is a way of controlling inflation when the economy crashes because monetary policy works on the basis of people being in debt so if the economy crashes and people can't pay off the debt then monetary policy will no longer be able to control inflation.
    Anyway to develope the taxation model I have to be able to prove that it can be altered on a monthly basis and that means that I have to write a computer program to do it. I have a degree in accounting an finance and have absolutely no expierence in computer programming but I only have a short time to complete my work.
    I live in England and have actually had quite a lot of success with my work and have been working with three of the four main political parties. I don't know where you live but my work might help your economy too.
    Anyway that's the reason why I am don't know what I am talking about.
    Oh yeah Thank you for your help and I a having given you a duke star for providing me with a useful answer.

  • Please help - free transform distort...

    Hey.
    No matter what I try, I can't get to distort objects using the free transform tool. I know I have to click/hold/drag the anchorpoint first, I've read all the help files, tutorials and sp forth, but none of the modifier-keys has any effect while I'm doing that. I'm a fairly experienced user, and - to put it mildly - about to kick in my screen over not getting something simple as this to work?!
    I'm on a Mac, using CS4. And pretty pissed off...
    Hans

    Make sure Bounding Boxes are visible (View menu.)
    Select the object.
    Get the FreeTransform tool. Mousedown on a BoundingBox corner.
    THEN press and hold the modifer keys.
    Then drag.
    JET

  • XML 2 HTML. Please help..

    Is there any standard API / programme(already written) in Java, to convert a HTML document to XML and also XML to HTML.
    Any suggestions, tips, links are appreciated. Please help.
    Thanks in advance,
    Xej.

    Hi!
    For XML to HTML conversion I use XSL transformation utilizing Xalan for Java(xml.apache.org). The other way round is not such an easy task because HTML is a little bit unpredictable with its tag usage. For example a <br> tag as line break is ok for all browsers but it's not well formed XML - in this case it should be
    If HTML is well formed in XML terms it's called XHTML and since that is a XML language you could use XSL for transforming it into another XML document.
    ~k

  • Lookup transformation - Performance Issue -Please help!

    Hi,
     I have a Source table with 5 million rows. I am pulling all the rows from the source table, then doing the lookup with 5 different tables one by one.
    I use Full cache as the lookup table size is very less only. I used 'Ignore Failure' option in lookup table as I need to do the left join. That means, even if there is NO match, those records also should be passed to the bottom.
     Now, the problem is it is taking a lot of time. To load 1,00,000 records, it is taking 1 hour. The how about 5 Million rows? 50 hours? Could you please help me to find out what is the  mistake i am doing here?

    Is the performance still very poor if you only add for example a row count transformation after your source?
    How many rows are there in the lookup tables? Are you only selecting the columns you need? Is the data type of the selected columns very large?
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • Free transform not working in CC [was:PLEASE HELP ME!!!]

    Hello! Please, Please Help me! I installed Photoshop CC to edit my photo and when I use  free transformation it is not working. I need just to transform one litte area in the photo.
    I have windows 7 64 bits. Thank you!

    Chris, Thank you! I wanted to change the eye area, so when I selected the area and used free transformation tool, it did not work. Free transformation worked only for the whole image but not for the selcted area. I was using this video. May be I need some more plug ins. http://www.youtube.com/watch?v=KI8Ab213ejU

  • Please help...excel to html

    Dear,
    I have a assignment about java. My platform is red hat linux, jsp, tomcat server. I don't know how to upload a excel file and display this in browser. The main problem is that how to convert excel file into html format or anyother method?
    that is i want to display the excel file in jsp....Can anyone help me.
    Please help me as it is very urgent. please!!
    Thanks very much
    joyce

    Work assignment or homework for school?
    joycejoyce, you're swallowing a lot here if you really are fresh to Java. Have you written any Java before taking on this assignment?
    You sound like you're in a panic. Get a good book on servlets, like Jason Hunter's O'Reilly book or Marty Hall's "Core Servlets and JSPs" and start reading a little before you jump into a POI black hole.
    No matter how desperate you are, you can't expect anybody watching this forum to just hand you a solution. You're going to have to do some work, and it's going to take time. Start reading, coding, and learning. Try to do something easy before you do something hard. Can you run Tomcat at all? Can you do a simple servlet and JSP and get them to work? That's a start. Do that before you tackle anything else.
    JMHO. - MOD

  • Urgent - please help with parsing HTML

    Hi,
    I'm very new to Java - i'm a biology major, actually, but taking this class for fun. Unfortunately, I'm having quite a bit of trouble with it. I've written a class that downloads a web page, converts it to a string, and then sends the string to another class, called BankRecord.
    The web page string looks something like this:
    bodylinks101>Prime Mortgage</a><br><span class=bodytext101>(909) 369-1012</span></td><td bgcolor=#e4e4e4 valign=top align=center><span class=bodytext101>4/18/2003</span><br><span class=bodytext101>10:15</td><td bgcolor=#e4e4e4 valign=top align=center><span class=bodytext101>5.875%</span>
    So, what I am trying to do is parse the HTML so that it returns, as a string, the appropriate information. For example, in the above HTML, I want "Prime Mortgage (909) 369-1012 4/18/2003" etc.
    The above is just one record, with several fields (bank name, phone number, date). The entire web page has quite a few records, for different banks, and I need to extract all of them. I think I've figured out how to find the start and end of the first record, but I don't know how to go about looking for more records. I'm guessing a loop? Also, how do I go about distinguish between the fields in each record (i.e., how to distinguish between phone number and date fields) Here is the code I have so far:
    import java.util.*;
    public class BankRecord
        //  Set up variables
        private String strContent;
        private Integer intPos;
        //  Constructor
        public BankRecord (String strVar)
             strContent = strWebPage;  // set strContent to incoming string
             intPos = 1;  // initialize intPos to 1
        public getNextRecord()
        // uses findBankStart to find next bank record; if found, return true.
        private findBankStart(intPos)
        // accept an integer indicating a place to start looking for beginning of each
        // bank record.  If there are no more records, return a -1; otherwise, return
        // starting position
             // Find beginning of record
             int intRecStart = strContent.indexOf("bodylinks101>",intRecStart);
             // Find end of record
             int intRecEnd = strContent.indexOf("bodylinks101>Apply",intRecEnd);
             // Find beginning of first field in record
             int FldStart = intRecStart + 13;
             // Find end of field in record
             int FldEnd = strContent.indexOf("<",intFldStart);
        public getField(intFldNum)
             // return the field asked for by number as a string.
    }PLEASE help as soon as possible...thank you very much.

    Thuyker,
    Here are 2 approaches:
    If you have a fixed format, parse via delimiters. For example, if each "record" is as follows:
    <span>Name</span><span>Acct No</span><span>balance</span>
    each "field" of the record is delimited by <span>...</span> tags. Thus, you could use regular old string functions such as indexOf() to read through the HTML string, and to pick apart the data you need.
    Alternatively, get a HTML parser, and let it do the work for you. A SAX-like one that I've used successfully is at http://www.quiotix.com/downloads/html-parser/
    --A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • I have a scenario. Import IDOC into PI and PI transform IDOC to Excel. Using mail adapter attach that Excel using pi and send to customer. Can you please help me on the same?

    HI Experts,
    I have a scenario. Import IDOC into PI and PI transform IDOC to Excel. Using mail adapter attach that Excel using pi and send to vendor. Can you please help me on the same?
    Thanks
    SaiSreevastav

    Hi Sai,
    you can use XSLT or java mapping or adapter module to convert IDOC xml to XLS. Please refer the below blog
    Convert incoming XML to Excel or Excel XML – Part 1 - XSLT Way
    Convert incoming XML to Excel Sheet Part 2 – Adapter Module way
    Convert incoming XML to Excel Sheet
    then after converting to Excel, you can use the payloadswap bean in mail adapter
    XI: Sender mail adapter - PayloadSwapBean - Step by step
    regards,
    Harish

  • PLEASE Help with HTML code for email background image...

    Hi there!
    i have a background image that I want to pop into an html email widget for the email's background...  here is the web link I created in Photoshop: file:///C:/Users/Rachel/Desktop/iMuse%20Clients/LeadMachine360/Email%20Signatures/tileabl e-metal-textures-2.html
    If anyone could please help me out that would be AWESOME!  I've attached pics of the background & I'm using Infusionsoft email builder which allows for HTML widgets.  I have a code that I use for my landing pages & webforms which works, tried that but no dice!
    Any help would be much appreciated - I'm an html newbie!
    Here is the code that I use for landing pages & works great, tried it for the email & it was a fail:
    <style>
      #mainContent .background, {
          background: url('file:///C:/Users/Rachel/Desktop/iMuse%20Clients/LeadMachine360/Email%20Signatures/ti leable-metal-textures-2.html') no-repeat center center fixed;
        background-size: cover;
    </style>
    <script src="file:///C:/Users/Rachel/Desktop/iMuse%20Clients/LeadMachine360/Email%20Signatures/ti leable-metal-textures-2.html">
    </script>
    <script>
      jQuery(document).ready(
          function(){
          jQuery(' table.bodyContainer').removeAttr('bgcolor');
    </script>
    thanks in advance!
    Muse

    Not sure what you expect. Your URL is absolute and pointing to a local file resource. It's not a proper relative HTML link. Beyond that it's toatlly unclear how you actually plan to load your image and where they are hosted, so nobody can tell you anything. Either way, there is an obviously painful lack of understanding of even the most basic web techniques, so the best advise anyone would give you is to spend some time with a web search and actualyl learn some of that stuff...
    Mylenium

  • I have made a webpage in HTML with several links to JPGs / GIFs. The text matter opens perfectly but not the images. Please help me

    I have made a web page in HTML with several links to JPGs / GIFs. While text matter opens up perfectly, but not the images. Please help me.
    == This happened ==
    Every time Firefox opened
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; CTS Version; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

    URL of that web page?

  • In Data Quality transform please explain Associate transform with the help of any example.

    In Data Quality transform please explain Associate transform with the help of any example.

    Hi Neha,
    If we are using multiple match transforms and consolidate the final output we will use associate transform .
    Let me explain with one example based on data quality blue prints for USA .
    We have customer/vendor data .     We need to find the duplicates .
    1. First  we will find the duplicates  on   Name and Address
    2. Second  we will find the duplicates on Name and Email
    3. Third we will find the duplicates on Name and Phone
    Here why we need to find the duplicates in multiple stages . If we are finding the duplicates on combination of  Name, Address, Email and Phone  we may not get proper duplicates   as we are finding the potential duplicates . That's why we are finding the duplicates on different combinations .
    In this case we will get the different group numbers for each match combination . Each combination name is there .
    We want to consolidate and give the group number to the whole set of duplicates . We will pass these  3 match groups to associative transform and generate the  consolidated match group for the input data.
    I hope you understand the concept .
    Thanks & Regards,
    Ramana.

  • Javafx deployment in html page(please help me urgent)

    i used the following method to deploy javafx in an html page.
    javafx file is:
    package hello;
    import javafx.scene.*;
    import javafx.stage.Stage;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    import javafx.scene.paint.Color;
    import javafx.scene.effect.DropShadow;
    Stage {
        title: "My Applet"
        width: 250
        height: 80
        scene: Scene {
            content: Text {
                x: 10  y: 30
                font: Font {
                     size: 24 }
                fill: Color.BLUE
                effect: DropShadow{ offsetX: 3 offsetY: 3}
                content: "VAARTA"
    I save the file as HelloApplet in a 'hello' named folder in my D:
    after that i downloaded from internet html code as
    <html>
        <head>
            <title>Wiki</title>
        </head>
        <body>
            <h1>Wiki</h1>
            <script src="dtfx.js"></script>
            <script>
                javafx(
                    archive: "HelloApplet.jar",
                    draggable: true,
                    width: 150,
                    height: 100,
                    code: "hello.HelloApplet",
                    name: "Wiki"
            </script>
        </body>
    </html>now i typed in DOS prompt as javafxc.exe HelloApplet.fx & i got the class files .
    _The main problem which is coming is how to create HelloApplet.jar file which is used in the html page without which the html page is not displaying the javafx script. Please help me urgently i am in the middle of my project & stuck up due to JAVAFX                   i am using WIndowsXP & javafx-sdk1.0 when i am typing jar command inside hello package it is displaying invalid command.in DOS prompt. If there is any other method to deploy javafx in html page then specify it also.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Crossposted: [http://forums.sun.com/thread.jspa?threadID=5323288].
    Please don't crosspost without notifying others. It is rude in terms of netiquette. Stick to one topic.

Maybe you are looking for

  • Error while executing WS to RFC sync on 7.4 single stack

    Hi Experts I am working in ws..>sap pi..>Rfc sync scerio when  I have entered the data in RFC its working fi9 but I am using SOAPUI to test it, it's giving me error: <text>com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.

  • After iTunes upgrade and software upgrade, receiving -9808 error

    After upgrading to iTunes 10.2.1.1, began my iTouch 3rd gen IOS upgrade (to 4. whatever). Received the -9809 error "We could not complete your iTunes Store Request". Did a restore and still frozen on the USB pointing to iTunes logo and still receivin

  • Publishing Exchange coexistance in 2010/2013 in TMG

    I already asked this in the TMG forums and didnt really get the answers there, so hoping I get better luck here, so slightly rephrased: Environment: Two Windows 2008 R2, Exchange 2010 SP3 servers, currently holding all mailboxes Two Windows 2012 R2,

  • Auth_check --- FM

    How to find the autho object for the particular field? for eg: p0002-begda. for the particular user i want to restrict the download for single field, How I can differentiate between the 2 users. wt's use of CALL 'AUTH_CHECK

  • How do I reset or enable a disabled usb port on a macbook air 10.7.2

    Ok, tried installing a thumb drive and a message says "too much power is being drawn, usb is disabled..."  Does anyone know how to reset or enable a disabled usb on a MBA?  Thanks