From b0fa81eea9a270f23d6ad67ca7a6d25c18d20da1 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 16 Jul 2005 01:27:14 +0000 Subject: Major merge with Classpath. Removed many duplicate files. * HACKING: Updated.x * classpath: Imported new directory. * standard.omit: New file. * Makefile.in, aclocal.m4, configure: Rebuilt. * sources.am: New file. * configure.ac: Run Classpath configure script. Moved code around to support. Disable xlib AWT peers (temporarily). * Makefile.am (SUBDIRS): Added 'classpath' (JAVAC): Removed. (AM_CPPFLAGS): Added more -I options. (BOOTCLASSPATH): Simplified. Completely redid how sources are built. Include sources.am. * include/Makefile.am (tool_include__HEADERS): Removed jni.h. * include/jni.h: Removed (in Classpath). * scripts/classes.pl: Updated to look at built classes. * scripts/makemake.tcl: New file. * testsuite/libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Added -I options. (gcj_jni_invocation_compile_c_to_binary): Likewise. From-SVN: r102082 --- libjava/javax/xml/transform/ErrorListener.java | 66 ----- libjava/javax/xml/transform/OutputKeys.java | 103 -------- libjava/javax/xml/transform/Result.java | 72 ------ libjava/javax/xml/transform/Source.java | 60 ----- libjava/javax/xml/transform/SourceLocator.java | 70 ----- libjava/javax/xml/transform/Templates.java | 67 ----- libjava/javax/xml/transform/Transformer.java | 164 ------------ .../TransformerConfigurationException.java | 103 -------- .../javax/xml/transform/TransformerException.java | 241 ----------------- .../javax/xml/transform/TransformerFactory.java | 284 --------------------- .../TransformerFactoryConfigurationError.java | 104 -------- libjava/javax/xml/transform/URIResolver.java | 58 ----- libjava/javax/xml/transform/dom/DOMLocator.java | 57 ----- libjava/javax/xml/transform/dom/DOMResult.java | 163 ------------ libjava/javax/xml/transform/dom/DOMSource.java | 118 --------- libjava/javax/xml/transform/sax/SAXResult.java | 132 ---------- libjava/javax/xml/transform/sax/SAXSource.java | 197 -------------- .../xml/transform/sax/SAXTransformerFactory.java | 115 --------- .../javax/xml/transform/sax/TemplatesHandler.java | 68 ----- .../xml/transform/sax/TransformerHandler.java | 78 ------ .../javax/xml/transform/stream/StreamResult.java | 173 ------------- .../javax/xml/transform/stream/StreamSource.java | 210 --------------- 22 files changed, 2703 deletions(-) delete mode 100644 libjava/javax/xml/transform/ErrorListener.java delete mode 100644 libjava/javax/xml/transform/OutputKeys.java delete mode 100644 libjava/javax/xml/transform/Result.java delete mode 100644 libjava/javax/xml/transform/Source.java delete mode 100644 libjava/javax/xml/transform/SourceLocator.java delete mode 100644 libjava/javax/xml/transform/Templates.java delete mode 100644 libjava/javax/xml/transform/Transformer.java delete mode 100644 libjava/javax/xml/transform/TransformerConfigurationException.java delete mode 100644 libjava/javax/xml/transform/TransformerException.java delete mode 100644 libjava/javax/xml/transform/TransformerFactory.java delete mode 100644 libjava/javax/xml/transform/TransformerFactoryConfigurationError.java delete mode 100644 libjava/javax/xml/transform/URIResolver.java delete mode 100644 libjava/javax/xml/transform/dom/DOMLocator.java delete mode 100644 libjava/javax/xml/transform/dom/DOMResult.java delete mode 100644 libjava/javax/xml/transform/dom/DOMSource.java delete mode 100644 libjava/javax/xml/transform/sax/SAXResult.java delete mode 100644 libjava/javax/xml/transform/sax/SAXSource.java delete mode 100644 libjava/javax/xml/transform/sax/SAXTransformerFactory.java delete mode 100644 libjava/javax/xml/transform/sax/TemplatesHandler.java delete mode 100644 libjava/javax/xml/transform/sax/TransformerHandler.java delete mode 100644 libjava/javax/xml/transform/stream/StreamResult.java delete mode 100644 libjava/javax/xml/transform/stream/StreamSource.java (limited to 'libjava/javax/xml/transform') diff --git a/libjava/javax/xml/transform/ErrorListener.java b/libjava/javax/xml/transform/ErrorListener.java deleted file mode 100644 index 5a9eee8..0000000 --- a/libjava/javax/xml/transform/ErrorListener.java +++ /dev/null @@ -1,66 +0,0 @@ -/* ErrorListener.java -- - Copyright (C) 2004, 2005 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ -package javax.xml.transform; - -/** - * Error reporting callback handler. - * Equivalent to the SAX ErrorHandler. - * - * @author (a href='mailto:dog@gnu.org'>Chris BurdessChris BurdessChris BurdessChris BurdessChris BurdessChris Burdessxsl:output - * instruction. Missing properties are defaulted according the - * XSLT Recommendation, section - * 16: getProperty(String) returns all properties - * including defaulted ones, and get(Object) returns only the - * properties explicitly set in the stylesheet. - */ - public Properties getOutputProperties(); - -} diff --git a/libjava/javax/xml/transform/Transformer.java b/libjava/javax/xml/transform/Transformer.java deleted file mode 100644 index 9054125..0000000 --- a/libjava/javax/xml/transform/Transformer.java +++ /dev/null @@ -1,164 +0,0 @@ -/* Transformer.java -- - Copyright (C) 2004, 2005 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package javax.xml.transform; - -import java.util.Properties; - -/** - * An XSL transformation. - * Instances of this class may be reused, but the same instance may not be - * used concurrently by different threads. - * - * @author (a href='mailto:dog@gnu.org'>Chris Burdess{namespaceURI}localName - * @param value the value to assign - */ - public abstract void setParameter(String name, Object value); - - /** - * Returns the specified parameter value. - * @param name the parameter name (an XML Name, or a namespace-prefixed - * XML Name of the form {namespaceURI}localName - */ - public abstract Object getParameter(String name); - - /** - * Clears all parameter values. - */ - public abstract void clearParameters(); - - /** - * Sets the callback used to resolve entities referenced by - * xsl:include, xsl:import, or the XPath - * document() function. - */ - public abstract void setURIResolver(URIResolver resolver); - - /** - * Returns the callback used to resolve entities referenced by - * xsl:include, xsl:import, or the XPath - * document() function. - */ - public abstract URIResolver getURIResolver(); - - /** - * Sets the output properties for the transformation, overriding any - * properties defined in the stylesheet. - * The format of property keys is as in the - * {@link #setOutputProperty(java.lang.String,java.lang.String)} method. - * @param oformat a set of output properties, or null to reset all the - * properties to their default values - */ - public abstract void setOutputProperties(Properties oformat) - throws IllegalArgumentException; - - /** - * Returns a copy of the output properties for the transformation. - * Missing properties are defaulted according the - * XSLT Recommendation, section - * 16: getProperty(String) returns all properties - * including defaulted ones, and get(Object) returns only the - * properties explicitly set in the stylesheet. - */ - public abstract Properties getOutputProperties(); - - /** - * Sets an output property for the transformation, overriding any property - * of the same name defined in the stylesheet. - * @param name the property name (an XML Name, or a namespace-prefixed - * XML Name of the form {namespaceURI}localName - * @param value the string value of the property - * @exception IllegalArgumentException if the property is not supported - */ - public abstract void setOutputProperty(String name, String value) - throws IllegalArgumentException; - - /** - * Returns the value of an output property for the transformation. - * Only explicit properties set programmatically or defined in the - * stylesheet, not defaulted properties, are returned by this method. - * @param name the property name (an XML Name, or a namespace-prefixed - * XML Name of the form {namespaceURI}localName - * @exception IllegalArgumentException if the property is not supported - */ - public abstract String getOutputProperty(String name) - throws IllegalArgumentException; - - /** - * Sets the callback used to report errors during the transformation. - * @exception IllegalArgumentException if the listener is null - */ - public abstract void setErrorListener(ErrorListener listener) - throws IllegalArgumentException; - - /** - * Returns the callback used to report errors during the transformation. - */ - public abstract ErrorListener getErrorListener(); - - // -- JAXP 1.3 methods -- - - /** - * Reset this Transformer to its original configuration. - * @since 1.3 - */ - public void reset() - { - } - -} diff --git a/libjava/javax/xml/transform/TransformerConfigurationException.java b/libjava/javax/xml/transform/TransformerConfigurationException.java deleted file mode 100644 index b2153c2..0000000 --- a/libjava/javax/xml/transform/TransformerConfigurationException.java +++ /dev/null @@ -1,103 +0,0 @@ -/* TransformerConfigurationException.java -- - Copyright (C) 2004, 2005 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package javax.xml.transform; - -/** - * An exception occurred during configuration of the transformer. - * - * @author (a href='mailto:dog@gnu.org'>Chris BurdessChris BurdessChris Burdess - *
  • the javax.xml.transform.TransformerFactory system - * property
  • - *
  • the above named property value in the - * $JAVA_HOME/lib/jaxp.properties file
  • - *
  • the class name specified in the - * META-INF/services/javax.xml.parsers.DocumentBuilderFactory - * system resource
  • - *
  • the default factory class
  • - * - */ - public static TransformerFactory newInstance() - throws TransformerFactoryConfigurationError - { - ClassLoader loader = Thread.currentThread().getContextClassLoader(); - if (loader == null) - { - loader = TransformerFactory.class.getClassLoader(); - } - String className = null; - int count = 0; - do - { - className = getFactoryClassName(loader, count++); - if (className != null) - { - try - { - Class t = (loader != null) ? loader.loadClass(className) : - Class.forName(className); - return (TransformerFactory) t.newInstance(); - } - catch (ClassNotFoundException e) - { - className = null; - } - catch (Exception e) - { - throw new TransformerFactoryConfigurationError(e, - "error instantiating class " + className); - } - } - } - while (className == null && count < 3); - try - { - Class t = - Class.forName("gnu.xml.transform.TransformerFactoryImpl"); - return (TransformerFactory) t.newInstance(); - } - catch (Exception e) - { - throw new TransformerFactoryConfigurationError(e); - } - } - - private static String getFactoryClassName(ClassLoader loader, int attempt) - { - final String propertyName = "javax.xml.transform.TransformerFactory"; - switch (attempt) - { - case 0: - return System.getProperty(propertyName); - case 1: - try - { - File file = new File(System.getProperty("java.home")); - file = new File(file, "lib"); - file = new File(file, "jaxp.properties"); - InputStream in = new FileInputStream(file); - Properties props = new Properties(); - props.load(in); - in.close(); - return props.getProperty(propertyName); - } - catch (IOException e) - { - return null; - } - case 2: - try - { - String serviceKey = "/META-INF/services/" + propertyName; - InputStream in = (loader != null) ? - loader.getResourceAsStream(serviceKey) : - TransformerFactory.class.getResourceAsStream(serviceKey); - if (in != null) - { - BufferedReader r = - new BufferedReader(new InputStreamReader(in)); - String ret = r.readLine(); - r.close(); - return ret; - } - } - catch (IOException e) - { - } - return null; - default: - return null; - } - } - - /** - * Creates a new transformer using the specified stylesheet. - * @param source the source of an XSLT - * stylesheet specifying the transformation to apply - */ - public abstract Transformer newTransformer(Source source) - throws TransformerConfigurationException; - - /** - * Creates a new transformer that applies the identity transform. - */ - public abstract Transformer newTransformer() - throws TransformerConfigurationException; - - /** - * Creates a new compiled transformation using the specified stylesheet. - * @param source the source of an XSLT - * stylesheet specifying the transformation to apply - */ - public abstract Templates newTemplates(Source source) - throws TransformerConfigurationException; - - /** - * Returns a source object representing the XML resource specified by the - * xml-stylesheet - * processing instruction and matching the given criteria. - * Note that if multiple stylesheets are selected, the source represents a - * stylesheet composed of a list of imports. - * @param source the source XML document - * @param media the media attribute to match, or null to match - * the preferred templates - * @param title the title attribute to match, or null to match - * any - * @param charset the charset attribute to match, or null to - * match any - */ - public abstract Source getAssociatedStylesheet(Source source, - String media, - String title, - String charset) - throws TransformerConfigurationException; - - /** - * Set the resolver callback to be used by transformers obtained from - * this factory. - */ - public abstract void setURIResolver(URIResolver resolver); - - /** - * Returns the resolver callback to be used by transformers obtained from - * this factory. - */ - public abstract URIResolver getURIResolver(); - - /** - * Sets a feature of transformers and templates obtained from this - * factory. - * Feature names are fully qualified URIs, and may depend on the factory - * implementation. - * @param name the name of the feature - * @param value the feature state - * @exception TransformerConfigurationException if the feature is - * unsupported - */ - public abstract void setFeature(String name, boolean value) - throws TransformerConfigurationException; - - /** - * Returns the state of a feature in the factory implementation. - * Feature names are fully qualified URIs, and may depend on the factory - * implementation. JAXP also predefines several features, including the - * constants in {@link javax.xml.XMLConstants} and - * - * The latter expose various capabilities of the factory implementation. - */ - public abstract boolean getFeature(String name); - - /** - * Set a named attribute on the underlying implementation. - * @param name the attribute name - * @param value the value to assign - * @exception IllegalArgumentException if the attribute is not supported - */ - public abstract void setAttribute(String name, Object value) - throws IllegalArgumentException; - - /** - * Retrieve the specified named attribute value. - * @param name the attribute name - * @exception IllegalArgumentException if the attribute is not supported - */ - public abstract Object getAttribute(String name) - throws IllegalArgumentException; - - /** - * Sets the callback to be used by transformers obtained from this factory - * to report transformation errors. - */ - public abstract void setErrorListener(ErrorListener listener) - throws IllegalArgumentException; - - /** - * Returns the callback to be used by transformers obtained from this - * factory to report transformation errors. - */ - public abstract ErrorListener getErrorListener(); - -} diff --git a/libjava/javax/xml/transform/TransformerFactoryConfigurationError.java b/libjava/javax/xml/transform/TransformerFactoryConfigurationError.java deleted file mode 100644 index 9b16b2b..0000000 --- a/libjava/javax/xml/transform/TransformerFactoryConfigurationError.java +++ /dev/null @@ -1,104 +0,0 @@ -/* TransformerFactoryConfigurationError.java -- - Copyright (C) 2004, 2005 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ -package javax.xml.transform; - -/** - * An error occurred during configuration of the transformer factory. - * - * @author (a href='mailto:dog@gnu.org'>Chris BurdessChris Burdessxsl:include, xsl:import, or - * XPath document() function. - * @param href the URI to resolve (relative or absolute) - * @param base the base URI relative to which the URI is to be resolved - * @return a source, or null if the resource could not be found - */ - public Source resolve(String href, String base) - throws TransformerException; - -} diff --git a/libjava/javax/xml/transform/dom/DOMLocator.java b/libjava/javax/xml/transform/dom/DOMLocator.java deleted file mode 100644 index 7f23706..0000000 --- a/libjava/javax/xml/transform/dom/DOMLocator.java +++ /dev/null @@ -1,57 +0,0 @@ -/* DOMLocator.java -- - Copyright (C) 2004, 2005 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package javax.xml.transform.dom; - -import javax.xml.transform.SourceLocator; -import org.w3c.dom.Node; - -/** - * Locator for reporting a location in a W3C DOM object graph. - * - * @author (a href='mailto:dog@gnu.org'>Chris BurdessChris BurdessChris BurdessChris BurdessChris BurdessChris BurdessChris BurdessChris BurdessChris BurdessChris Burdess