Results 1 to 2 of 2

Thread: com.imsl.chart

  1. #1

    Thread Starter
    Lively Member illebille's Avatar
    Join Date
    Sep 2003
    Posts
    77

    com.imsl.chart

    I have a file "SampleSalesTransform.java" :

    [CODE]
    import com.imsl.chart.JFrameChart;
    import com.imsl.chart.xml.ChartXML;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.dom.DOMResult;
    import org.w3c.dom.Document;

    public class SampleSalesTransform {
    public static void main(String argv[]) throws Exception {
    String filenameXSL = argv[0];
    String filenameXML = argv[1];

    // Create an XML parser factory
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    DocumentBuilder builder = factory.newDocumentBuilder();

    // Parse the XSL file as an XML file
    Document docXSL = builder.parse(filenameXSL);
    DOMSource sourceXSL = new DOMSource(docXSL);
    sourceXSL.setSystemId(filenameXSL);

    // Create a transformation based on the XSL file
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer(sourceXSL);

    // Parse the input XML file
    Document docXML = builder.parse(filenameXML);
    DOMSource sourceXML = new DOMSource(docXML);
    sourceXML.setSystemId(filenameXML);

    // Transform the input XML file using the XSL transformer
    DOMResult result = new DOMResult();
    transformer.transform(sourceXML, result);

    // Create a chart from the transformed XML
    //ChartXML chartXML = new ChartXML((Document)result.getNode());
    //new JFrameChart(chartXML.getChart()).show();
    }
    }

    CODE]

    but when I try to compile it, it gives the following error :
    "package com.imsl.chart does not exist"

    what is wrong ?

  2. #2
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Re: com.imsl.chart

    Do you have these packges? Looks like something you need to download before using.
    import com.imsl.chart.JFrameChart;
    import com.imsl.chart.xml.ChartXML;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width