aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/javax/xml
diff options
context:
space:
mode:
authorMark Wielaard <mark@gcc.gnu.org>2006-03-10 21:46:48 +0000
committerMark Wielaard <mark@gcc.gnu.org>2006-03-10 21:46:48 +0000
commit8aa540d2f783474d1d2e06f16744bf67b9c1facc (patch)
treeea38c56431c5d4528fb54254c3f8e50f517bede3 /libjava/classpath/javax/xml
parent27079765d00123f8e53d0e1ef7f9d46559266e6d (diff)
downloadgcc-8aa540d2f783474d1d2e06f16744bf67b9c1facc.zip
gcc-8aa540d2f783474d1d2e06f16744bf67b9c1facc.tar.gz
gcc-8aa540d2f783474d1d2e06f16744bf67b9c1facc.tar.bz2
Imported GNU Classpath 0.90
Imported GNU Classpath 0.90 * scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore. * gnu/classpath/jdwp/VMFrame.java (SIZE): New constant. * java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5. * java/lang/Math.java: New override file. * java/lang/Character.java: Merged from Classpath. (start, end): Now 'int's. (canonicalName): New field. (CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants. (UnicodeBlock): Added argument. (of): New overload. (forName): New method. Updated unicode blocks. (sets): Updated. * sources.am: Regenerated. * Makefile.in: Likewise. From-SVN: r111942
Diffstat (limited to 'libjava/classpath/javax/xml')
-rw-r--r--libjava/classpath/javax/xml/parsers/DocumentBuilderFactory.java27
-rw-r--r--libjava/classpath/javax/xml/stream/EventFilter.java3
-rw-r--r--libjava/classpath/javax/xml/stream/Location.java7
-rw-r--r--libjava/classpath/javax/xml/stream/StreamFilter.java3
-rw-r--r--libjava/classpath/javax/xml/stream/XMLEventFactory.java6
-rw-r--r--libjava/classpath/javax/xml/stream/XMLEventReader.java22
-rw-r--r--libjava/classpath/javax/xml/stream/XMLEventWriter.java2
-rw-r--r--libjava/classpath/javax/xml/stream/XMLFilter.java46
-rw-r--r--libjava/classpath/javax/xml/stream/XMLInputFactory.java28
-rw-r--r--libjava/classpath/javax/xml/stream/XMLIterator.java61
-rw-r--r--libjava/classpath/javax/xml/stream/XMLOutputFactory.java30
-rw-r--r--libjava/classpath/javax/xml/stream/XMLReporter.java2
-rw-r--r--libjava/classpath/javax/xml/stream/XMLResolver.java24
-rw-r--r--libjava/classpath/javax/xml/stream/XMLStreamConstants.java16
-rw-r--r--libjava/classpath/javax/xml/stream/XMLStreamReader.java6
-rw-r--r--libjava/classpath/javax/xml/stream/events/EndEntity.java53
-rw-r--r--libjava/classpath/javax/xml/stream/events/EntityDeclaration.java6
-rw-r--r--libjava/classpath/javax/xml/stream/events/EntityReference.java24
-rw-r--r--libjava/classpath/javax/xml/stream/events/StartEntity.java53
-rw-r--r--libjava/classpath/javax/xml/stream/events/XMLEvent.java12
-rw-r--r--libjava/classpath/javax/xml/stream/util/EventReaderDelegate.java24
-rw-r--r--libjava/classpath/javax/xml/stream/util/ReaderDelegate.java10
-rw-r--r--libjava/classpath/javax/xml/validation/SchemaFactory.java8
23 files changed, 120 insertions, 353 deletions
diff --git a/libjava/classpath/javax/xml/parsers/DocumentBuilderFactory.java b/libjava/classpath/javax/xml/parsers/DocumentBuilderFactory.java
index 1cbb9a7..0dc574e 100644
--- a/libjava/classpath/javax/xml/parsers/DocumentBuilderFactory.java
+++ b/libjava/classpath/javax/xml/parsers/DocumentBuilderFactory.java
@@ -309,6 +309,7 @@ public abstract class DocumentBuilderFactory
/**
* Returns the schema.
* @see #setSchema
+ * @since 1.5
*/
public Schema getSchema()
{
@@ -318,6 +319,7 @@ public abstract class DocumentBuilderFactory
/**
* Sets the schema.
* @see #getSchema
+ * @since 1.5
*/
public void setSchema(Schema schema)
{
@@ -327,7 +329,7 @@ public abstract class DocumentBuilderFactory
/**
* Indicates whether parsers obtained from this factory will be XInclude
* aware.
- * @since 1.3
+ * @since 1.5
*/
public boolean isXIncludeAware()
{
@@ -336,11 +338,32 @@ public abstract class DocumentBuilderFactory
/**
* Sets whether parsers obtained from this factory will be XInclude aware.
- * @since 1.3
+ * @since 1.5
*/
public void setXIncludeAware(boolean state)
{
xIncludeAware = state;
}
+
+ /**
+ * Sets the value of the specified feature.
+ * @param name the feature name (URI)
+ * @param value whether to enable the feature or not
+ * @exception ParserConfigurationException if the feature is not
+ * supported.
+ * @since 1.5
+ */
+ public abstract void setFeature(String name, boolean value)
+ throws ParserConfigurationException;
+
+ /**
+ * Returns the value of the specified feature.
+ * @param name the feature name (URI)
+ * @exception ParserConfigurationException if the feature is not
+ * supported.
+ * @since 1.5
+ */
+ public abstract boolean getFeature(String name)
+ throws ParserConfigurationException;
}
diff --git a/libjava/classpath/javax/xml/stream/EventFilter.java b/libjava/classpath/javax/xml/stream/EventFilter.java
index 288c741..6d0cb65 100644
--- a/libjava/classpath/javax/xml/stream/EventFilter.java
+++ b/libjava/classpath/javax/xml/stream/EventFilter.java
@@ -1,5 +1,5 @@
/* EventFilter.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,7 +43,6 @@ import javax.xml.stream.events.XMLEvent;
* Simple filter interface for XML events.
*/
public interface EventFilter
- extends XMLFilter
{
/**
diff --git a/libjava/classpath/javax/xml/stream/Location.java b/libjava/classpath/javax/xml/stream/Location.java
index d043ba2..8f9f807 100644
--- a/libjava/classpath/javax/xml/stream/Location.java
+++ b/libjava/classpath/javax/xml/stream/Location.java
@@ -63,9 +63,14 @@ public interface Location
int getCharacterOffset();
/**
+ * Returns the public identifier for this location, if any.
+ */
+ String getPublicId();
+
+ /**
* Returns the system identifier for the underlying source.
*/
- String getLocationURI();
+ String getSystemId();
}
diff --git a/libjava/classpath/javax/xml/stream/StreamFilter.java b/libjava/classpath/javax/xml/stream/StreamFilter.java
index 77fbfc7..376bd94 100644
--- a/libjava/classpath/javax/xml/stream/StreamFilter.java
+++ b/libjava/classpath/javax/xml/stream/StreamFilter.java
@@ -1,5 +1,5 @@
/* StreamFilter.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,6 @@ package javax.xml.stream;
* Simple filter interface for XMLStreamReaders.
*/
public interface StreamFilter
- extends XMLFilter
{
/**
diff --git a/libjava/classpath/javax/xml/stream/XMLEventFactory.java b/libjava/classpath/javax/xml/stream/XMLEventFactory.java
index 456414d..ee47af2 100644
--- a/libjava/classpath/javax/xml/stream/XMLEventFactory.java
+++ b/libjava/classpath/javax/xml/stream/XMLEventFactory.java
@@ -1,5 +1,5 @@
/* XMLEventFactory.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -320,10 +320,8 @@ public abstract class XMLEventFactory
/**
* Create an entity reference event.
*/
- //public abstract EntityReference createEntityReference(String name,
- // EntityDeclaration declaration);
public abstract EntityReference createEntityReference(String name,
- String replacementText);
+ EntityDeclaration declaration);
/**
* Create a comment event.
diff --git a/libjava/classpath/javax/xml/stream/XMLEventReader.java b/libjava/classpath/javax/xml/stream/XMLEventReader.java
index 5d4c170..35ad569 100644
--- a/libjava/classpath/javax/xml/stream/XMLEventReader.java
+++ b/libjava/classpath/javax/xml/stream/XMLEventReader.java
@@ -1,5 +1,5 @@
/* XMLEventReader.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,10 +44,21 @@ import javax.xml.stream.events.XMLEvent;
* An XML parser.
*/
public interface XMLEventReader
- extends XMLIterator
+ extends Iterator
{
/**
+ * Returns the next XML event.
+ */
+ XMLEvent nextEvent()
+ throws XMLStreamException;
+
+ /**
+ * Indicates whether there are more XML events to be read.
+ */
+ boolean hasNext();
+
+ /**
* Looks at the next XML event without advancing the cursor in the stream.
* Returns <code>null</code> if there are no more events to read.
*/
@@ -80,5 +91,12 @@ public interface XMLEventReader
Object getProperty(String name)
throws IllegalArgumentException;
+ /**
+ * Free any resources associated with this parser.
+ * This method will not close the underlying input source.
+ */
+ void close()
+ throws XMLStreamException;
+
}
diff --git a/libjava/classpath/javax/xml/stream/XMLEventWriter.java b/libjava/classpath/javax/xml/stream/XMLEventWriter.java
index 60b18f9..fe85f23 100644
--- a/libjava/classpath/javax/xml/stream/XMLEventWriter.java
+++ b/libjava/classpath/javax/xml/stream/XMLEventWriter.java
@@ -1,5 +1,5 @@
/* XMLEventWriter.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/libjava/classpath/javax/xml/stream/XMLFilter.java b/libjava/classpath/javax/xml/stream/XMLFilter.java
deleted file mode 100644
index 7e7698d..0000000
--- a/libjava/classpath/javax/xml/stream/XMLFilter.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/* XMLFilter.java --
- Copyright (C) 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.stream;
-
-/**
- * Marker interface for stream and event filters.
- */
-public interface XMLFilter
-{
-}
-
diff --git a/libjava/classpath/javax/xml/stream/XMLInputFactory.java b/libjava/classpath/javax/xml/stream/XMLInputFactory.java
index 4c904a6..4dfd120 100644
--- a/libjava/classpath/javax/xml/stream/XMLInputFactory.java
+++ b/libjava/classpath/javax/xml/stream/XMLInputFactory.java
@@ -1,5 +1,5 @@
/* XMLInputFactory.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -324,17 +324,17 @@ public abstract class XMLInputFactory
/**
* Creates a new stream reader.
- *
+ */
public abstract XMLStreamReader createXMLStreamReader(String systemId,
InputStream stream)
- throws XMLStreamException;*/
+ throws XMLStreamException;
/**
* Creates a new stream reader.
- *
+ */
public abstract XMLStreamReader createXMLStreamReader(String systemId,
Reader reader)
- throws XMLStreamException;*/
+ throws XMLStreamException;
/**
* Creates a new event reader.
@@ -344,10 +344,10 @@ public abstract class XMLInputFactory
/**
* Creates a new event reader.
- *
+ */
public abstract XMLEventReader createXMLEventReader(String systemId,
Reader reader)
- throws XMLStreamException;*/
+ throws XMLStreamException;
/**
* Creates a new event reader.
@@ -376,10 +376,10 @@ public abstract class XMLInputFactory
/**
* Creates a new event reader.
- *
+ */
public abstract XMLEventReader createXMLEventReader(String systemId,
InputStream stream)
- throws XMLStreamException;*/
+ throws XMLStreamException;
/**
* Create a new filtered reader.
@@ -444,15 +444,5 @@ public abstract class XMLInputFactory
*/
public abstract XMLEventAllocator getEventAllocator();
- /**
- * Sets whether text will be coalesced.
- */
- public abstract void setCoalescing(boolean coalescing);
-
- /**
- * Indicates whether text will be coalesced.
- */
- public abstract boolean isCoalescing();
-
}
diff --git a/libjava/classpath/javax/xml/stream/XMLIterator.java b/libjava/classpath/javax/xml/stream/XMLIterator.java
deleted file mode 100644
index e12bffa..0000000
--- a/libjava/classpath/javax/xml/stream/XMLIterator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/* XMLIterator.java --
- Copyright (C) 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.stream;
-
-import javax.xml.stream.events.XMLEvent;
-
-/**
- * Simple iterator for XML events.
- */
-public interface XMLIterator
-{
-
- /**
- * Returns the next XML event.
- */
- XMLEvent next()
- throws XMLStreamException;
-
- /**
- * Indicates whether there are more XML events to be read.
- */
- boolean hasNext()
- throws XMLStreamException;
-
-}
-
diff --git a/libjava/classpath/javax/xml/stream/XMLOutputFactory.java b/libjava/classpath/javax/xml/stream/XMLOutputFactory.java
index cf31f02..e4c9dd4 100644
--- a/libjava/classpath/javax/xml/stream/XMLOutputFactory.java
+++ b/libjava/classpath/javax/xml/stream/XMLOutputFactory.java
@@ -1,5 +1,5 @@
/* XMLOutputFactory.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,7 +46,7 @@ import java.io.IOException;
import java.io.OutputStream;
import java.io.Writer;
import java.util.Properties;
-//import javax.xml.transform.Result;
+import javax.xml.transform.Result;
/**
* Factory for obtaining XML stream and event writers for various kinds of
@@ -77,8 +77,8 @@ public abstract class XMLOutputFactory
* If true, the writer will create a namespace declaration for any
* attribute that doesn't have a namespace declaration in scope.
*/
- public static final java.lang.String IS_PREFIX_DEFAULTING =
- "javax.xml.stream.isPrefixDefaulting";
+ public static final java.lang.String IS_REPAIRING_NAMESPACES =
+ "javax.xml.stream.isRepairingNamespaces";
protected XMLOutputFactory()
{
@@ -219,16 +219,16 @@ public abstract class XMLOutputFactory
* @exception UnsupportedOperationException if this method is not
* supported
*/
- //public abstract XMLStreamWriter createXMLStreamWriter(Result result)
- // throws XMLStreamException;
+ public abstract XMLStreamWriter createXMLStreamWriter(Result result)
+ throws XMLStreamException;
/**
* Creates a new event writer.
* @exception UnsupportedOperationException if this method is not
* supported
*/
- //public abstract XMLEventWriter createXMLEventWriter(Result result)
- // throws XMLStreamException;
+ public abstract XMLEventWriter createXMLEventWriter(Result result)
+ throws XMLStreamException;
/**
* Creates a new event writer.
@@ -264,23 +264,9 @@ public abstract class XMLOutputFactory
throws IllegalArgumentException;
/**
- * Indicates whether writers created by this factory will perform prefix
- * defaulting.
- * @see #IS_PREFIX_DEFAULTING
- */
- public abstract boolean isPrefixDefaulting();
-
- /**
* Indicates whether the specified property is supported.
*/
public abstract boolean isPropertySupported(String name);
- /**
- * Sets whether writers created by this factory will perform prefix
- * defaulting.
- * @see #IS_PREFIX_DEFAULTING
- */
- public abstract void setPrefixDefaulting(boolean value);
-
}
diff --git a/libjava/classpath/javax/xml/stream/XMLReporter.java b/libjava/classpath/javax/xml/stream/XMLReporter.java
index bdf0b8a..d545656 100644
--- a/libjava/classpath/javax/xml/stream/XMLReporter.java
+++ b/libjava/classpath/javax/xml/stream/XMLReporter.java
@@ -1,5 +1,5 @@
/* XMLReporter.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/libjava/classpath/javax/xml/stream/XMLResolver.java b/libjava/classpath/javax/xml/stream/XMLResolver.java
index 148afc6..2dabaee 100644
--- a/libjava/classpath/javax/xml/stream/XMLResolver.java
+++ b/libjava/classpath/javax/xml/stream/XMLResolver.java
@@ -1,5 +1,5 @@
/* XMLResolver.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -37,8 +37,6 @@ exception statement from your version. */
package javax.xml.stream;
-import java.io.InputStream;
-
/**
* Interface used to resolve XML external entities during parsing.
*/
@@ -59,28 +57,10 @@ public interface XMLResolver
* @param systemID the system ID of the external entity
* @param baseURI the absolute base URI of the referring entity
* @param namespace the namespace of the external entity
- *
+ */
Object resolveEntity(String publicID, String systemID,
String baseURI, String namespace)
- throws XMLStreamException;*/
-
- /**
- * Retrieves a resource from the specified URI.
- */
- XMLEventReader resolveAsXMLEventReader(String uri)
throws XMLStreamException;
- /**
- * Retrieves a resource from the specified URI.
- */
- XMLStreamReader resolveAsXMLStreamReader(String uri)
- throws XMLStreamException;
-
- /**
- * Retrieves a resource from the specified URI.
- */
- InputStream resolve(String uri)
- throws XMLStreamException;
-
}
diff --git a/libjava/classpath/javax/xml/stream/XMLStreamConstants.java b/libjava/classpath/javax/xml/stream/XMLStreamConstants.java
index 1f0d2ef..e41627d 100644
--- a/libjava/classpath/javax/xml/stream/XMLStreamConstants.java
+++ b/libjava/classpath/javax/xml/stream/XMLStreamConstants.java
@@ -1,5 +1,5 @@
/* XMLStreamConstants.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -109,24 +109,14 @@ public interface XMLStreamConstants
static final int NAMESPACE = 13;
/**
- * A start-entity event.
- */
- static final int START_ENTITY = 14;
-
- /**
- * An end-entity event.
- */
- static final int END_ENTITY = 15;
-
- /**
* A notation declaration event.
*/
- static final int NOTATION_DECLARATION = 16;
+ static final int NOTATION_DECLARATION = 14;
/**
* An entity declaration event.
*/
- static final int ENTITY_DECLARATION = 17;
+ static final int ENTITY_DECLARATION = 15;
}
diff --git a/libjava/classpath/javax/xml/stream/XMLStreamReader.java b/libjava/classpath/javax/xml/stream/XMLStreamReader.java
index e598fab..f8648b1 100644
--- a/libjava/classpath/javax/xml/stream/XMLStreamReader.java
+++ b/libjava/classpath/javax/xml/stream/XMLStreamReader.java
@@ -1,5 +1,5 @@
/* XMLStreamReader.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -136,7 +136,7 @@ public interface XMLStreamReader
/**
* Returns the QName of the attribute at the given index.
*/
- QName getAttributeQName(int index);
+ QName getAttributeName(int index);
/**
* Returns the namespace URI of the attribute at the given index.
@@ -146,7 +146,7 @@ public interface XMLStreamReader
/**
* Returns the local-name of the attribute at the given index.
*/
- String getAttributeName(int index);
+ String getAttributeLocalName(int index);
/**
* Returns the namespace prefix of the attribute at the given index.
diff --git a/libjava/classpath/javax/xml/stream/events/EndEntity.java b/libjava/classpath/javax/xml/stream/events/EndEntity.java
deleted file mode 100644
index b5c32d7..0000000
--- a/libjava/classpath/javax/xml/stream/events/EndEntity.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/* EndEntity.java --
- Copyright (C) 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.stream.events;
-
-/**
- * An end-entity event.
- */
-public interface EndEntity
- extends XMLEvent
-{
-
- /**
- * Returns the entity name.
- */
- String getName();
-
-}
-
diff --git a/libjava/classpath/javax/xml/stream/events/EntityDeclaration.java b/libjava/classpath/javax/xml/stream/events/EntityDeclaration.java
index a319f09..a0120dd 100644
--- a/libjava/classpath/javax/xml/stream/events/EntityDeclaration.java
+++ b/libjava/classpath/javax/xml/stream/events/EntityDeclaration.java
@@ -1,5 +1,5 @@
/* EntityDeclaration.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -67,12 +67,12 @@ public interface EntityDeclaration
/**
* Returns the replacement text for the entity.
*/
- //String getReplacementText();
+ String getReplacementText();
/**
* Returns the base URI for the entity.
*/
- //String getBaseURI();
+ String getBaseURI();
}
diff --git a/libjava/classpath/javax/xml/stream/events/EntityReference.java b/libjava/classpath/javax/xml/stream/events/EntityReference.java
index 7244709..460433c 100644
--- a/libjava/classpath/javax/xml/stream/events/EntityReference.java
+++ b/libjava/classpath/javax/xml/stream/events/EntityReference.java
@@ -1,5 +1,5 @@
/* EntityReference.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,34 +45,14 @@ public interface EntityReference
{
/**
- * Returns the base URI for the entity.
- */
- String getBaseUri();
-
- /**
- * Returns the public identifier for the entity.
- */
- String getPublicId();
-
- /**
- * Returns the system identifierfor the entity.
- */
- String getSystemId();
-
- /**
* Returns the declaration of this reference.
*/
- //EntityDeclaration getDeclaration();
+ EntityDeclaration getDeclaration();
/**
* Returns the entity name.
*/
String getName();
- /**
- * Returns the replacement text for the entity.
- */
- String getReplacementText();
-
}
diff --git a/libjava/classpath/javax/xml/stream/events/StartEntity.java b/libjava/classpath/javax/xml/stream/events/StartEntity.java
deleted file mode 100644
index d41e0db..0000000
--- a/libjava/classpath/javax/xml/stream/events/StartEntity.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/* StartEntity.java --
- Copyright (C) 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.stream.events;
-
-/**
- * An start-entity event.
- */
-public interface StartEntity
- extends XMLEvent
-{
-
- /**
- * Returns the entity name.
- */
- String getName();
-
-}
-
diff --git a/libjava/classpath/javax/xml/stream/events/XMLEvent.java b/libjava/classpath/javax/xml/stream/events/XMLEvent.java
index 54e9516..7c427da 100644
--- a/libjava/classpath/javax/xml/stream/events/XMLEvent.java
+++ b/libjava/classpath/javax/xml/stream/events/XMLEvent.java
@@ -1,5 +1,5 @@
/* XMLEvent.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -106,16 +106,6 @@ public interface XMLEvent
boolean isEndDocument();
/**
- * Indicates whether this event is a start-entity event.
- */
- boolean isStartEntity();
-
- /**
- * Indicates whether this event is an end-entity event.
- */
- boolean isEndEntity();
-
- /**
* Returns this event as a start-element event.
*/
StartElement asStartElement();
diff --git a/libjava/classpath/javax/xml/stream/util/EventReaderDelegate.java b/libjava/classpath/javax/xml/stream/util/EventReaderDelegate.java
index f6d1585..be943e4 100644
--- a/libjava/classpath/javax/xml/stream/util/EventReaderDelegate.java
+++ b/libjava/classpath/javax/xml/stream/util/EventReaderDelegate.java
@@ -1,5 +1,5 @@
/* EventReaderDelegate.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -82,16 +82,22 @@ public class EventReaderDelegate
return parent;
}
- public XMLEvent next()
+ public XMLEvent nextEvent()
throws XMLStreamException
{
if (parent != null)
+ return parent.nextEvent();
+ throw new NoSuchElementException();
+ }
+
+ public Object next()
+ {
+ if (parent != null)
return parent.next();
throw new NoSuchElementException();
}
public boolean hasNext()
- throws XMLStreamException
{
if (parent != null)
return parent.hasNext();
@@ -130,5 +136,17 @@ public class EventReaderDelegate
throw new IllegalArgumentException(name);
}
+ public void close()
+ throws XMLStreamException
+ {
+ if (parent != null)
+ parent.close();
+ }
+
+ public void remove()
+ {
+ throw new UnsupportedOperationException();
+ }
+
}
diff --git a/libjava/classpath/javax/xml/stream/util/ReaderDelegate.java b/libjava/classpath/javax/xml/stream/util/ReaderDelegate.java
index ef70175..d502866 100644
--- a/libjava/classpath/javax/xml/stream/util/ReaderDelegate.java
+++ b/libjava/classpath/javax/xml/stream/util/ReaderDelegate.java
@@ -1,5 +1,5 @@
/* ReaderDelegate.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -186,10 +186,10 @@ public class ReaderDelegate
return 0;
}
- public QName getAttributeQName(int index)
+ public QName getAttributeName(int index)
{
if (parent != null)
- return parent.getAttributeQName(index);
+ return parent.getAttributeName(index);
return null;
}
@@ -207,10 +207,10 @@ public class ReaderDelegate
return null;
}
- public String getAttributeName(int index)
+ public String getAttributeLocalName(int index)
{
if (parent != null)
- return parent.getAttributeName(index);
+ return parent.getAttributeLocalName(index);
return null;
}
diff --git a/libjava/classpath/javax/xml/validation/SchemaFactory.java b/libjava/classpath/javax/xml/validation/SchemaFactory.java
index 35bf205..f33c1c6 100644
--- a/libjava/classpath/javax/xml/validation/SchemaFactory.java
+++ b/libjava/classpath/javax/xml/validation/SchemaFactory.java
@@ -39,6 +39,7 @@ package javax.xml.validation;
import java.io.File;
import java.net.URL;
+import javax.xml.XMLConstants;
import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamSource;
import org.w3c.dom.ls.LSResourceResolver;
@@ -50,7 +51,7 @@ import org.xml.sax.SAXNotSupportedException;
/**
* Factory for obtaining schemata.
*
- * @author (a href='mailto:dog@gnu.org'>Chris Burdess</a)
+ * @author Chris Burdess (dog@gnu.org)
* @since 1.3
*/
public abstract class SchemaFactory
@@ -70,7 +71,10 @@ public abstract class SchemaFactory
*/
public static final SchemaFactory newInstance(String schemaLanguage)
{
- // TODO
+ if (XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(schemaLanguage))
+ return new gnu.xml.validation.xmlschema.XMLSchemaSchemaFactory();
+ if (XMLConstants.RELAXNG_NS_URI.equals(schemaLanguage))
+ return new gnu.xml.validation.relaxng.RELAXNGSchemaFactory();
throw new IllegalArgumentException(schemaLanguage);
}