[Home]  [List]  [News]  [Docs]  [FAQ]  [Downloads]  [Resources]  [About]
Search :
/Home /List

list4xt : Mailing list for the XT users community.

[list4xt] DocumentHandler

Subject: [list4xt] DocumentHandler

User: Website

From: Pascal Pannetier (Pascal.Pannetier@CREATIS.fr)
Date: 18/09/2001 - 14:53


Hi,

I arrived in your mailling list and I start in Java XML.

When I compile a exemple for xsl java servlet I have a compilation error,
and I don't understand why?

Can you help me?

I use this librairies :
xt.jar
sax.jar or sax2.jar (same result)
crimson.jar
....

I compile with Forte for java.

Compile Error Message is :

AphorismsToHtmlTbl.java [18:1] Note: class org.xml.sax.DocumentHandler has
been deprecated.
                                implements DocumentHandler, ErrorHandler

                                           ^
AphorismsToHtmlTbl.java [135:1] Note: class org.xml.sax.AttributeList has
been deprecated.
    public void startElement(java.lang.String name, AttributeList
attributes)
                                                    ^
AphorismsToHtmlTbl.java [140:1] Note: The method public abstract int
getLength() in class org.xml.sax.AttributeList has been deprecated.
        for (int i = 0; i < attributes.getLength(); i++)
                                       ^
AphorismsToHtmlTbl.java [142:1] Note: The method public abstract String
getName(int) in class org.xml.sax.AttributeList has been deprecated.
            String attName = attributes.getName(i);
                                        ^
AphorismsToHtmlTbl.java [143:1] Note: The method public abstract String
getType(int) in class org.xml.sax.AttributeList has been deprecated.
            String type = attributes.getType(i);
                                     ^
AphorismsToHtmlTbl.java [144:1] Note: The method public abstract String
getValue(int) in class org.xml.sax.AttributeList has been deprecated.
            String value = attributes.getValue(i);
                                      ^
6 warnings

Part of source is :

import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.*;

import com.sun.xml.parser.Resolver;
import com.sun.xml.tree.XmlDocument;
import org.xml.sax.*;
import org.w3c.dom.*;

import com.jclark.xsl.sax.*;
import com.jclark.xsl.dom.*;

public class AphorismsToHtmlTbl extends HttpServlet
                                implements DocumentHandler, ErrorHandler

{
:
:
:

    /** method of the DocumentHandler Interface. */
    public void startElement(java.lang.String name, AttributeList
attributes)
    {

        // Receive notification of the start of an element.
        pw.print("<" + name + " ");
        for (int i = 0; i < attributes.getLength(); i++)
        {
            String attName = attributes.getName(i);
            String type = attributes.getType(i);
            String value = attributes.getValue(i);
            pw.print(attName + "=" + value + " ");
        }
        pw.println(">");
    }

Fichier joint :

 <<AphorismsToHtmlTbl.java>>

-- Binary/unsupported file stripped by Listar --
-- Type: application/octet-stream
-- File: AphorismsToHtmlTbl.java

--
Mailing list for the XT users community.     (http://millstonenjhomes.com)
(mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)



Archive générée par hypermail 2b28 le 06/11/2001 - 11:46 CET

webmaster@4xt.org