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/XMLConstants.java | 126 ------- .../datatype/DatatypeConfigurationException.java | 70 ---- libjava/javax/xml/datatype/DatatypeConstants.java | 259 ------------- libjava/javax/xml/datatype/DatatypeFactory.java | 401 --------------------- libjava/javax/xml/datatype/Duration.java | 295 --------------- .../javax/xml/datatype/XMLGregorianCalendar.java | 217 ----------- libjava/javax/xml/namespace/NamespaceContext.java | 66 ---- libjava/javax/xml/namespace/QName.java | 160 -------- libjava/javax/xml/parsers/DocumentBuilder.java | 203 ----------- .../javax/xml/parsers/DocumentBuilderFactory.java | 346 ------------------ .../xml/parsers/FactoryConfigurationError.java | 113 ------ .../xml/parsers/ParserConfigurationException.java | 66 ---- libjava/javax/xml/parsers/SAXParser.java | 340 ----------------- libjava/javax/xml/parsers/SAXParserFactory.java | 273 -------------- 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 ----------- libjava/javax/xml/validation/Schema.java | 61 ---- libjava/javax/xml/validation/SchemaFactory.java | 168 --------- libjava/javax/xml/validation/TypeInfoProvider.java | 83 ----- libjava/javax/xml/validation/Validator.java | 117 ------ libjava/javax/xml/validation/ValidatorHandler.java | 115 ------ libjava/javax/xml/xpath/XPath.java | 115 ------ libjava/javax/xml/xpath/XPathConstants.java | 87 ----- libjava/javax/xml/xpath/XPathException.java | 86 ----- libjava/javax/xml/xpath/XPathExpression.java | 86 ----- .../javax/xml/xpath/XPathExpressionException.java | 60 --- libjava/javax/xml/xpath/XPathFactory.java | 227 ------------ .../xpath/XPathFactoryConfigurationException.java | 60 --- libjava/javax/xml/xpath/XPathFunction.java | 58 --- .../javax/xml/xpath/XPathFunctionException.java | 60 --- libjava/javax/xml/xpath/XPathFunctionResolver.java | 59 --- libjava/javax/xml/xpath/XPathVariableResolver.java | 52 --- 52 files changed, 7132 deletions(-) delete mode 100644 libjava/javax/xml/XMLConstants.java delete mode 100644 libjava/javax/xml/datatype/DatatypeConfigurationException.java delete mode 100644 libjava/javax/xml/datatype/DatatypeConstants.java delete mode 100644 libjava/javax/xml/datatype/DatatypeFactory.java delete mode 100644 libjava/javax/xml/datatype/Duration.java delete mode 100644 libjava/javax/xml/datatype/XMLGregorianCalendar.java delete mode 100644 libjava/javax/xml/namespace/NamespaceContext.java delete mode 100644 libjava/javax/xml/namespace/QName.java delete mode 100644 libjava/javax/xml/parsers/DocumentBuilder.java delete mode 100644 libjava/javax/xml/parsers/DocumentBuilderFactory.java delete mode 100644 libjava/javax/xml/parsers/FactoryConfigurationError.java delete mode 100644 libjava/javax/xml/parsers/ParserConfigurationException.java delete mode 100644 libjava/javax/xml/parsers/SAXParser.java delete mode 100644 libjava/javax/xml/parsers/SAXParserFactory.java 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 delete mode 100644 libjava/javax/xml/validation/Schema.java delete mode 100644 libjava/javax/xml/validation/SchemaFactory.java delete mode 100644 libjava/javax/xml/validation/TypeInfoProvider.java delete mode 100644 libjava/javax/xml/validation/Validator.java delete mode 100644 libjava/javax/xml/validation/ValidatorHandler.java delete mode 100644 libjava/javax/xml/xpath/XPath.java delete mode 100644 libjava/javax/xml/xpath/XPathConstants.java delete mode 100644 libjava/javax/xml/xpath/XPathException.java delete mode 100644 libjava/javax/xml/xpath/XPathExpression.java delete mode 100644 libjava/javax/xml/xpath/XPathExpressionException.java delete mode 100644 libjava/javax/xml/xpath/XPathFactory.java delete mode 100644 libjava/javax/xml/xpath/XPathFactoryConfigurationException.java delete mode 100644 libjava/javax/xml/xpath/XPathFunction.java delete mode 100644 libjava/javax/xml/xpath/XPathFunctionException.java delete mode 100644 libjava/javax/xml/xpath/XPathFunctionResolver.java delete mode 100644 libjava/javax/xml/xpath/XPathVariableResolver.java (limited to 'libjava/javax/xml') diff --git a/libjava/javax/xml/XMLConstants.java b/libjava/javax/xml/XMLConstants.java deleted file mode 100644 index 7356207..0000000 --- a/libjava/javax/xml/XMLConstants.java +++ /dev/null @@ -1,126 +0,0 @@ -/* XMLConstants.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; - -/** - * Repository for well-known XML constants. - * - * @author (a href='mailto:dog@gnu.org'>Chris BurdessChris BurdessChris BurdessDuration class. - */ - public static final class Field - { - - final int id; - final String name; - - Field(int id, String name) - { - this.id = id; - this.name = name; - } - - public int getId() - { - return id; - } - - public String toString() - { - return name; - } - - } - - /** - * Value for January. - */ - public static final int JANUARY = 1; - - /** - * Value for February. - */ - public static final int FEBRUARY = 2; - - /** - * Value for March. - */ - public static final int MARCH = 3; - - /** - * Value for April. - */ - public static final int APRIL = 4; - - /** - * Value for May. - */ - public static final int MAY = 5; - - /** - * Value for June. - */ - public static final int JUNE = 6; - - /** - * Value for July. - */ - public static final int JULY = 7; - - /** - * Value for August. - */ - public static final int AUGUST = 8; - - /** - * Value for September. - */ - public static final int SEPTEMBER = 9; - - /** - * Value for October. - */ - public static final int OCTOBER = 10; - - /** - * Value for November. - */ - public static final int NOVEMBER = 11; - - /** - * Value for December. - */ - public static final int DECEMBER = 12; - - /** - * Comparison result. - */ - public static final int LESSER = -1; - - /** - * Comparison result. - */ - public static final int EQUAL = 0; - - /** - * Comparison result. - */ - public static final int GREATER = 1; - - /** - * Comparison result. - */ - public static final int INDETERMINATE = 2; - - /** - * Comparison result. - */ - public static final int FIELD_UNDEFINED = -2147483648; - - /** - * Constant that represents the years field. - */ - public static final Field YEARS = new Field(1, "YEARS"); - - /** - * Constant that represents the months field. - */ - public static final Field MONTHS = new Field(2, "MONTHS"); - - /** - * Constant that represents the days field. - */ - public static final Field DAYS = new Field(3, "DAYS"); - - /** - * Constant that represents the hours field. - */ - public static final Field HOURS = new Field(4, "HOURS"); - - /** - * Constant that represents the minutes field. - */ - public static final Field MINUTES = new Field(5, "MINUTES"); - - /** - * Constant that represents the seconds field. - */ - public static final Field SECONDS = new Field(6, "SECONDS"); - - /** - * The qualified-name for the dateTime data type. - */ - public static final QName DATETIME = new QName ("http://www.w3.org/2001/XMLSchema#dateTime", ""); - - /** - * The qualified-name for the time data type. - */ - public static final QName TIME = new QName ("http://www.w3.org/2001/XMLSchema#time", ""); - - /** - * The qualified-name for the date data type. - */ - public static final QName DATE = new QName ("http://www.w3.org/2001/XMLSchema#date", ""); - - /** - * The qualified-name for the gYearMonth data type. - */ - public static final QName GYEARMONTH = new QName ("http://www.w3.org/2001/XMLSchema#gYearMonth", ""); - - /** - * The qualified-name for the gMonthDay data type. - */ - public static final QName GMONTHDAY = new QName ("http://www.w3.org/2001/XMLSchema#gMonthDay", ""); - - /** - * The qualified-name for the gYear data type. - */ - public static final QName GYEAR = new QName ("http://www.w3.org/2001/XMLSchema#gYear", ""); - - /** - * The qualified-name for the gMonth data type. - */ - public static final QName GMONTH = new QName ("http://www.w3.org/2001/XMLSchema#gMonth", ""); - - /** - * The qualified-name for the gDay data type. - */ - public static final QName GDAY = new QName ("http://www.w3.org/2001/XMLSchema#gDay", ""); - - /** - * The qualified-name for the duration data type. - */ - public static final QName DURATION = new QName ("http://www.w3.org/2001/XMLSchema#duration", ""); - - /** - * The qualified-name for the dayTimeDuration data type. - */ - public static final QName DURATION_DAYTIME = new QName ("http://www.w3.org/2001/XMLSchema#dayTimeDuration", ""); - - /** - * The qualified-name for the yearMonthDuration data type. - */ - public static final QName DURATION_YEARMONTH = new QName ("http://www.w3.org/2001/XMLSchema#yearMonthDuration", ""); - - /** - * XML Schema maximum timezone offset, in minutes. - */ - public static final int MAX_TIMEZONE_OFFSET = -840; - - /** - * XML Schema minimum timezone offset, in minutes. - */ - public static final int MIN_TIMEZONE_OFFSET = 840; - -} diff --git a/libjava/javax/xml/datatype/DatatypeFactory.java b/libjava/javax/xml/datatype/DatatypeFactory.java deleted file mode 100644 index 3f3a224..0000000 --- a/libjava/javax/xml/datatype/DatatypeFactory.java +++ /dev/null @@ -1,401 +0,0 @@ -/* DatatypeFactory.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.datatype; - -import java.math.BigDecimal; -import java.math.BigInteger; -import java.util.GregorianCalendar; - -/** - * Factory class to create new datatype objects mapping XML to and from Java - * objects. - * - * @author (a href='mailto:dog@gnu.org'>Chris BurdessChris BurdessstartInstant parameter is used to specify the duration - * offset. - */ - public long getTimeInMillis(Calendar startInstant) - { - Calendar cal = (Calendar) startInstant.clone(); - long t1 = cal.getTimeInMillis(); - addTo(cal); - long t2 = cal.getTimeInMillis(); - return t2 - t1; - } - - /** - * Returns the duration length in milliseconds. - * Because the length of a month or year may vary depending on the year, - * the startInstant parameter is used to specify the duration - * offset. - */ - public long getTimeInMillis(Date startInstant) - { - Date date = (Date) startInstant.clone(); - long t1 = date.getTime(); - addTo(date); - long t2 = date.getTime(); - return t2 - t1; - } - - /** - * Returns the value of the specified field, or null if the - * field is undefined. - */ - public abstract Number getField(DatatypeConstants.Field field); - - /** - * Indicates whether the specified field is set. - */ - public abstract boolean isSet(DatatypeConstants.Field field); - - /** - * Returns the result of adding the specified duration to this duration. - */ - public abstract Duration add(Duration rhs); - - /** - * Adds this duration to the specified calendar. - */ - public abstract void addTo(Calendar calendar); - /*{ - switch (getSign()) - { - case -1: - calendar.add(Calendar.YEAR, -getYears()); - calendar.add(Calendar.MONTH, -getMonths()); - calendar.add(Calendar.DATE, -getDays()); - calendar.add(Calendar.HOUR, -getHours()); - calendar.add(Calendar.MINUTE, -getMinutes()); - calendar.add(Calendar.SECOND, -getSeconds()); - break; - case 1: - calendar.add(Calendar.YEAR, getYears()); - calendar.add(Calendar.MONTH, getMonths()); - calendar.add(Calendar.DATE, getDays()); - calendar.add(Calendar.HOUR, getHours()); - calendar.add(Calendar.MINUTE, getMinutes()); - calendar.add(Calendar.SECOND, getSeconds()); - } - }*/ - - /** - * Adds this duration to the specified date. - */ - public void addTo(Date date) - { - Calendar calendar = new GregorianCalendar(); - calendar.setTimeInMillis(date.getTime()); - addTo(calendar); - date.setTime(calendar.getTimeInMillis()); - } - - /** - * Returns the result of subtracting the given duration from this - * duration. - */ - public Duration subtract(Duration rhs) - { - // TODO - throw new UnsupportedOperationException(); - } - - /** - * Returns the result of multiplying this duration by the given factor. - */ - public Duration multiply(int factor) - { - return multiply(BigDecimal.valueOf((long) factor)); - } - - /** - * Returns the result of multiplying this duration by the given factor. - */ - public Duration multiply(BigDecimal factor) - { - // TODO - throw new UnsupportedOperationException(); - } - - /** - * Returns the unary negative of this duration. - */ - public abstract Duration negate(); - - /** - * Converts the years and months fields into the days field using a - * specific time instant as the reference point. - */ - public abstract Duration normalizeWith(Calendar startTimeInstant); - - /** - * Partial order relation comparison with this duration, in accordance - * with XML Schema 1.0 Part 2, Section 3.2.7.6.2. - */ - public abstract int compare(Duration duration); - - public boolean isLongerThan(Duration duration) - { - // TODO - throw new UnsupportedOperationException(); - } - - public boolean isShorterThan(Duration duration) - { - // TODO - throw new UnsupportedOperationException(); - } - - public boolean equals(java.lang.Object duration) - { - // TODO - throw new UnsupportedOperationException(); - } - - public abstract int hashCode(); - - /** - * Returns the lexical representation of this duration. - */ - public String toString() - { - // TODO - throw new UnsupportedOperationException(); - } - -} diff --git a/libjava/javax/xml/datatype/XMLGregorianCalendar.java b/libjava/javax/xml/datatype/XMLGregorianCalendar.java deleted file mode 100644 index c0b6868..0000000 --- a/libjava/javax/xml/datatype/XMLGregorianCalendar.java +++ /dev/null @@ -1,217 +0,0 @@ -/* XMLGregorianCalendar.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.datatype; - -import java.math.BigDecimal; -import java.math.BigInteger; -import java.util.GregorianCalendar; -import java.util.Locale; -import java.util.TimeZone; -import javax.xml.namespace.QName; - -/** - * An XML Schema 1.0 date/time data type. - * - * @author (a href='mailto:dog@gnu.org'>Chris BurdessgetXMLSchemaType constraints. - */ - public abstract boolean isValid(); - - /** - * Adds the specified duration to this calendar. - */ - public abstract void add(Duration duration); - - public abstract GregorianCalendar toGregorianCalendar(); - - public abstract GregorianCalendar toGregorianCalendar(TimeZone timezone, - Locale locale, - XMLGregorianCalendar defaults); - - public abstract TimeZone getTimeZone(int defaultZoneoffset); - - public abstract Object clone(); - -} diff --git a/libjava/javax/xml/namespace/NamespaceContext.java b/libjava/javax/xml/namespace/NamespaceContext.java deleted file mode 100644 index 1bcb850..0000000 --- a/libjava/javax/xml/namespace/NamespaceContext.java +++ /dev/null @@ -1,66 +0,0 @@ -/* NamespaceContext.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.namespace; - -import java.util.Iterator; - -/** - * Interface by which namespace properties are made available. - * - * @author (a href='mailto:dog@gnu.org'>Chris Burdessqualified name. - * - * @author (a href='mailto:dog@gnu.org'>Chris Burdess 0) - { - buf.append('{'); - buf.append(namespaceURI); - buf.append('}'); - } - if (prefix != null && prefix.length() > 0) - { - buf.append(prefix); - buf.append(':'); - } - buf.append(localPart); - qName = buf.toString(); - } - - public QName(String localPart) - { - this(null, localPart, null); - } - - public String getNamespaceURI() - { - return namespaceURI; - } - - public String getLocalPart() - { - return localPart; - } - - public String getPrefix() - { - return prefix; - } - - public boolean equals(Object obj) - { - if (obj instanceof QName) - { - QName qname = (QName) obj; - return qname.getLocalPart().equals(localPart) && - qname.getNamespaceURI().equals(namespaceURI); - } - return false; - } - - public final int hashCode() - { - return qName.hashCode(); - } - - public String toString() - { - return qName; - } - - public static QName valueOf(String qNameAsString) - { - String namespaceUri = "", prefix = null; - int start = qNameAsString.indexOf('{'); - int end = qNameAsString.indexOf('}'); - if (start != -1) - { - if (end < start) - { - throw new IllegalArgumentException(qNameAsString); - } - namespaceUri = qNameAsString.substring(start + 1, end); - qNameAsString = qNameAsString.substring(end + 1); - } - start = qNameAsString.indexOf(':'); - if (start != -1) - { - prefix = qNameAsString.substring(0, start); - qNameAsString = qNameAsString.substring(start + 1); - } - return new QName(namespaceUri, qNameAsString, prefix); - } - -} diff --git a/libjava/javax/xml/parsers/DocumentBuilder.java b/libjava/javax/xml/parsers/DocumentBuilder.java deleted file mode 100644 index 56c55a3..0000000 --- a/libjava/javax/xml/parsers/DocumentBuilder.java +++ /dev/null @@ -1,203 +0,0 @@ -/* DocumentBuilder.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.parsers; - -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.io.IOException; -import javax.xml.validation.Schema; -import org.w3c.dom.Document; -import org.w3c.dom.DOMImplementation; -import org.xml.sax.InputSource; -import org.xml.sax.EntityResolver; -import org.xml.sax.ErrorHandler; -import org.xml.sax.SAXException; - -/** - * Convenience class for parsing an XML document into a W3C DOM object - * graph. - * Instances of this class are not guaranteed to be thread safe. - * - * @author (a href='mailto:dog@gnu.org'>Chris BurdessDOMImplementation instead. - * @see org.w3c.dom.DOMImplementation#createDocument - */ - public abstract Document newDocument(); - - /** - * Returns the DOM implementation. - */ - public abstract DOMImplementation getDOMImplementation(); - - // -- JAXP 1.3 methods -- - - /** - * Reset this document builder to its original configuration. - * @since 1.3 - */ - public void reset() - { - } - - /** - * Returns the schema in use by the XML processor. - */ - public Schema getSchema() - { - return null; - } - - /** - * Returns the XInclude processing mode in use by the parser. - */ - public boolean isXIncludeAware() - { - return false; - } - -} diff --git a/libjava/javax/xml/parsers/DocumentBuilderFactory.java b/libjava/javax/xml/parsers/DocumentBuilderFactory.java deleted file mode 100644 index 1cbb9a7..0000000 --- a/libjava/javax/xml/parsers/DocumentBuilderFactory.java +++ /dev/null @@ -1,346 +0,0 @@ -/* DocumentBuilderFactory.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.parsers; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.util.Properties; -import javax.xml.validation.Schema; - -/** - * Factory for obtaining document builders. - * Instances of this class are not guaranteed to be thread safe. - * - * @author (a href='mailto:dog@gnu.org'>Chris Burdess - *
  • the javax.xml.parsers.DocumentBuilderFactory 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 DocumentBuilderFactory newInstance() - { - ClassLoader loader = Thread.currentThread().getContextClassLoader(); - if (loader == null) - { - loader = DocumentBuilderFactory.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 (DocumentBuilderFactory) t.newInstance(); - } - catch (ClassNotFoundException e) - { - className = null; - } - catch (Exception e) - { - throw new FactoryConfigurationError(e, - "error instantiating class " + className); - } - } - } - while (className == null && count < 3); - return new gnu.xml.dom.DomDocumentBuilderFactory(); - } - - private static String getFactoryClassName(ClassLoader loader, int attempt) - { - final String propertyName = "javax.xml.parsers.DocumentBuilderFactory"; - 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) : - DocumentBuilderFactory.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 document builder instance using the currently specified - * factory configuration. - * @exception ParserConfigurationException if the specified configuration - * is not supported - */ - public abstract DocumentBuilder newDocumentBuilder() - throws ParserConfigurationException; - - /** - * Sets whether document builders obtained from this factory will be XML - * Namespace aware. - */ - public void setNamespaceAware(boolean awareness) - { - namespaceAware = awareness; - } - - /** - * Sets whether document builders obtained from this factory will validate - * their input. - */ - public void setValidating(boolean validating) - { - this.validating = validating; - } - - /** - * Sets whether document builders obtained from this factory will - * eliminate whitespace within elements that have an element-only content - * model. - */ - public void setIgnoringElementContentWhitespace(boolean whitespace) - { - ignoringElementContentWhitespace = whitespace; - } - - /** - * Sets whether document builders obtained from this factory will expand - * entity reference nodes. - */ - public void setExpandEntityReferences(boolean expandEntityRef) - { - expandEntityReferences = expandEntityRef; - } - - /** - * Sets whether document builders obtained from this factory will discard - * comment nodes. - */ - public void setIgnoringComments(boolean ignoreComments) - { - ignoringComments = ignoreComments; - } - - /** - * Sets whether document builders obtained from this factory will convert - * CDATA sections to text nodes and normalize adjacent text nodes into a - * single text node. - */ - public void setCoalescing(boolean coalescing) - { - this.coalescing = coalescing; - } - - /** - * Indicates whether document builders obtained from this factory will be - * XML Namespace aware. - */ - public boolean isNamespaceAware() - { - return namespaceAware; - } - - /** - * Indicates whether document builders obtained from this factory will - * validate their input. - */ - public boolean isValidating() - { - return validating; - } - - /** - * Indicates whether document builders obtained from this factory will - * eliminate whitespace within elements that have an element-only content - * model. - */ - public boolean isIgnoringElementContentWhitespace() - { - return ignoringElementContentWhitespace; - } - - /** - * Indicates whether document builders obtained from this factory will - * expand entity reference nodes. - */ - public boolean isExpandEntityReferences() - { - return expandEntityReferences; - } - - /** - * Indicates whether document builders obtained from this factory will - * discard comment nodes. - */ - public boolean isIgnoringComments() - { - return ignoringComments; - } - - /** - * Indicates whether document builders obtained from this factory will - * convert CDATA sections to text nodes and normalize adjacent text nodes - * into a single text node. - */ - public boolean isCoalescing() - { - return coalescing; - } - - /** - * Set the named attribute on the underlying implementation. - * @param name the name of the attribute - * @param value the new value - * @exception IllegalArgumentException if the attribute is not recognized - */ - public abstract void setAttribute(String name, Object value) - throws IllegalArgumentException; - - /** - * Retrieves the named attribute value from the underlying implementation. - * @param name the name of the attribute - * @exception IllegalArgumentException if the attribute is not recognized - */ - public abstract Object getAttribute(String name) - throws IllegalArgumentException; - - // -- JAXP 1.3 methods -- - - /** - * Returns the schema. - * @see #setSchema - */ - public Schema getSchema() - { - return schema; - } - - /** - * Sets the schema. - * @see #getSchema - */ - public void setSchema(Schema schema) - { - this.schema = schema; - } - - /** - * Indicates whether parsers obtained from this factory will be XInclude - * aware. - * @since 1.3 - */ - public boolean isXIncludeAware() - { - return xIncludeAware; - } - - /** - * Sets whether parsers obtained from this factory will be XInclude aware. - * @since 1.3 - */ - public void setXIncludeAware(boolean state) - { - xIncludeAware = state; - } - -} diff --git a/libjava/javax/xml/parsers/FactoryConfigurationError.java b/libjava/javax/xml/parsers/FactoryConfigurationError.java deleted file mode 100644 index 96d0fc0..0000000 --- a/libjava/javax/xml/parsers/FactoryConfigurationError.java +++ /dev/null @@ -1,113 +0,0 @@ -/* FactoryConfigurationError.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.parsers; - -/** - * An error occurred during configuration of the parser factory. - * - * @author (a href='mailto:dog@gnu.org'>Chris BurdessChris Burdessnot guaranteed to be thread safe. - * - * @author (a href='mailto:dog@gnu.org'>Chris Burdessnot guaranteed to be thread safe. - * - * @author (a href='mailto:dog@gnu.org'>Chris Burdess - *
  • the javax.xml.parsers.SAXParserFactory 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.SAXParserFactory - * system resource
  • - *
  • the default factory class
  • - * - */ - public static SAXParserFactory newInstance() - throws FactoryConfigurationError - { - ClassLoader loader = Thread.currentThread().getContextClassLoader(); - if (loader == null) - { - loader = SAXParserFactory.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 (SAXParserFactory) t.newInstance(); - } - catch (ClassNotFoundException e) - { - className = null; - } - catch (Exception e) - { - throw new FactoryConfigurationError(e, - "error instantiating class " + className); - } - } - } - while (className == null && count < 3); - return new gnu.xml.aelfred2.JAXPFactory(); - } - - private static String getFactoryClassName(ClassLoader loader, int attempt) - { - final String propertyName = "javax.xml.parsers.SAXParserFactory"; - 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) : - SAXParserFactory.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 parser instance using the currently specified factory - * configuration. - * @exception ParserConfigurationException if the specified configuration - * is not supported - */ - public abstract SAXParser newSAXParser() - throws ParserConfigurationException, SAXException; - - /** - * Sets whether parsers obtained from this factory will be XML Namespace - * aware. - */ - public void setNamespaceAware(boolean awareness) - { - namespaceAware = awareness; - } - - /** - * Sets whether parsers obtained from this factory will validate their - * input. - */ - public void setValidating(boolean validating) - { - this.validating = validating; - } - - /** - * Indicates whether parsers obtained from this factory will be XML - * Namespace aware. - */ - public boolean isNamespaceAware() - { - return namespaceAware; - } - - /** - * Indicates whether parsers obtained from this factory will validate - * their input. - */ - public boolean isValidating() - { - return validating; - } - - /** - * Sets the specified feature for SAX2 parsers obtained from this factory. - * @param name the feature name - * @param value the featurevalue - */ - public abstract void setFeature(String name, boolean value) - throws ParserConfigurationException, SAXNotRecognizedException, - SAXNotSupportedException; - - /** - * Returns the specified feature for SAX2 parsers obtained from this - * factory. - * @param name the feature name - */ - public abstract boolean getFeature(String name) - throws ParserConfigurationException, SAXNotRecognizedException, - SAXNotSupportedException; - - // -- JAXP 1.3 methods -- - - /** - * Returns the schema. - * @since 1.3 - * @see #setSchema - */ - public Schema getSchema() - { - return schema; - } - - /** - * Sets the schema. - * @since 1.3 - * @see #getSchema - */ - public void setSchema(Schema schema) - { - this.schema = schema; - } - - /** - * Indicates whether parsers obtained from this factory will be XInclude - * aware. - * @since 1.3 - */ - public boolean isXIncludeAware() - { - return xIncludeAware; - } - - /** - * Sets whether parsers obtained from this factory will be XInclude aware. - * @since 1.3 - */ - public void setXIncludeAware(boolean state) - { - xIncludeAware = state; - } - -} 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 BurdessChris BurdessChris BurdessSchemaFactory that supports - * the specified schema language. - * @param schemaLanguage the URI of a schema language (see - * XMLConstants) - */ - public static final SchemaFactory newInstance(String schemaLanguage) - { - // TODO - throw new IllegalArgumentException(schemaLanguage); - } - - /** - * Indicates whether the specified schema language is supported. - * @param schemaLanguage the URI of a schema language (see - * XMLConstants) - */ - public abstract boolean isSchemaLanguageSupported(String schemaLanguage); - - public boolean getFeature(String name) - throws SAXNotRecognizedException, SAXNotSupportedException - { - throw new SAXNotRecognizedException(name); - } - - public void setFeature(String name, boolean value) - throws SAXNotRecognizedException, SAXNotSupportedException - { - throw new SAXNotRecognizedException(name); - } - - public Object getProperty(String name) - throws SAXNotRecognizedException, SAXNotSupportedException - { - throw new SAXNotRecognizedException(name); - } - - public void setProperty(String name, Object value) - throws SAXNotRecognizedException, SAXNotSupportedException - { - throw new SAXNotRecognizedException(name); - } - - public ErrorHandler getErrorHandler() - { - return errorHandler; - } - - public void setErrorHandler(ErrorHandler errorHandler) - { - this.errorHandler = errorHandler; - } - - public abstract LSResourceResolver getResourceResolver(); - - public abstract void setResourceResolver(LSResourceResolver resourceResolver); - - /** - * Returns a schema based on the specified source resource. - * @param schema the source resource - */ - public Schema newSchema(Source schema) - throws SAXException - { - return newSchema(new Source[] { schema }); - } - - /** - * Returns a schema based on the specified source file. - * @param schema the source resource - */ - public Schema newSchema(File schema) - throws SAXException - { - return newSchema(new StreamSource(schema)); - } - - /** - * Returns a schema based on the specified URL. - * @param schema the source resource - */ - public Schema newSchema(URL schema) - throws SAXException - { - return newSchema(new StreamSource(schema.toString())); - } - - /** - * Parses the specified sources, and combine them into a single schema. - * The exact procedure and semantics of this depends on the schema - * language. - * @param schemata the schema resources to load - */ - public abstract Schema newSchema(Source[] schemata) - throws SAXException; - - /** - * Creates a special schema. - * The exact semantics of this depends on the schema language. - */ - public abstract Schema newSchema() - throws SAXException; - -} diff --git a/libjava/javax/xml/validation/TypeInfoProvider.java b/libjava/javax/xml/validation/TypeInfoProvider.java deleted file mode 100644 index 99bf283..0000000 --- a/libjava/javax/xml/validation/TypeInfoProvider.java +++ /dev/null @@ -1,83 +0,0 @@ -/* TypeInfoProvider.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.validation; - -import org.w3c.dom.TypeInfo; - -/** - * Provides access to the PSVI type info supplied by - * ValidatorHandler. - * - * @author (a href='mailto:dog@gnu.org'>Chris BurdessChris BurdessChris BurdessChris BurdessChris BurdessChris BurdessChris BurdessChris Burdess - *
  • the javax.xml.xpath.XPathFactory 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.xpath.XPathFactory system - * resource
  • - *
  • the default factory class
  • - * - * @param uri the object model URI - */ - public static final XPathFactory newInstance(String uri) - throws XPathFactoryConfigurationException - { - ClassLoader loader = Thread.currentThread().getContextClassLoader(); - if (loader == null) - { - loader = XPathFactory.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); - XPathFactory ret = (XPathFactory) t.newInstance(); - if (ret.isObjectModelSupported(uri)) - { - return ret; - } - className = null; - } - catch (ClassNotFoundException e) - { - className = null; - } - catch (Exception e) - { - throw new XPathFactoryConfigurationException(e); - } - } - } - while (className == null && count < 4); - String msg = "no factories with support for " + uri; - throw new XPathFactoryConfigurationException(msg); - } - - private static String getFactoryClassName(ClassLoader loader, int attempt) - { - final String propertyName = DEFAULT_PROPERTY_NAME; - 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) : - XPathFactory.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; - case 3: - return "gnu.xml.xpath.XPathFactoryImpl"; - default: - return null; - } - } - - /** - * Indicates whether the specified object model URI is supported by - * this factory. - */ - public abstract boolean isObjectModelSupported(String objectModel); - - /** - * Sets the state of the named feature. - */ - public abstract void setFeature(String name, boolean value) - throws XPathFactoryConfigurationException; - - /** - * Returns the state of the named feature. - */ - public abstract boolean getFeature(String name) - throws XPathFactoryConfigurationException; - - /** - * Sets the XPath variable resolver calback. - */ - public abstract void setXPathVariableResolver(XPathVariableResolver resolver); - - /** - * Sets the XPath extension function resolver calback. - */ - public abstract void setXPathFunctionResolver(XPathFunctionResolver resolver); - - /** - * Returns a new XPath evaluation environment. - */ - public abstract XPath newXPath(); - -} diff --git a/libjava/javax/xml/xpath/XPathFactoryConfigurationException.java b/libjava/javax/xml/xpath/XPathFactoryConfigurationException.java deleted file mode 100644 index a896463..0000000 --- a/libjava/javax/xml/xpath/XPathFactoryConfigurationException.java +++ /dev/null @@ -1,60 +0,0 @@ -/* XPathFactoryConfigurationException.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.xpath; - -/** - * A configuration exception in an XPath factory environment. - * - * @author (a href='mailto:dog@gnu.org'>Chris BurdessChris BurdessChris BurdessChris Burdess