[multiple changes]
authorMark Wielaard <mark@gcc.gnu.org>
Wed, 16 Feb 2005 19:25:06 +0000 (19:25 +0000)
committerMark Wielaard <mark@gcc.gnu.org>
Wed, 16 Feb 2005 19:25:06 +0000 (19:25 +0000)
2005-02-16  Mark Wielaard  <mark@klomp.org>

        * Makefile.am (gnu_xml_source_files): Removed
        gnu/xml/dom/DomCDATA.java, gnu/xml/dom/DomEx.java,
        gnu/xml/dom/DomFragment.java, gnu/xml/dom/DomPI.java and
        gnu/xml/dom/ls/DomLSEx.java. Replaced by adding
        gnu/xml/dom/DomCDATASection.java, gnu/xml/dom/DomDOMException.java,
        gnu/xml/dom/DomDocumentFragment.java,
        gnu/xml/dom/DomProcessingInstruction.java and
        gnu/xml/dom/ls/DomLSException.java.
        * Makefile.in: Regenerated.

2005-02-16  Tom Tromey  <tromey@redhat.com>

        * gnu/xml/aelfred2/SAXDriver.java: Ensure that null is returned when
        attribute index is out of bounds.

2005-02-16  Chris Burdess  <dog@gnu.org>

        * gnu/xml/aelfred2/SAXDriver.java: Corrected implementation of
        isDeclared methods. Improved performance of isSpecified methods.

2005-02-16  Chris Burdess  <dog@gnu.org>

        Fixes bug libgcj/19864
        * gnu/xml/dom/DomAttr.java,
        gnu/xml/dom/DomCDATA.java,
        gnu/xml/dom/DomCDATASection.java,
        gnu/xml/dom/DomCharacterData.java,
        gnu/xml/dom/DomDOMException.java,
        gnu/xml/dom/DomDoctype.java,
        gnu/xml/dom/DomDocument.java,
        gnu/xml/dom/DomDocumentConfiguration.java,
        gnu/xml/dom/DomDocumentFragment.java,
        gnu/xml/dom/DomElement.java,
        gnu/xml/dom/DomEx.java,
        gnu/xml/dom/DomFragment.java,
        gnu/xml/dom/DomImpl.java,
        gnu/xml/dom/DomIterator.java,
        gnu/xml/dom/DomNamedNodeMap.java,
        gnu/xml/dom/DomNode.java,
        gnu/xml/dom/DomNsNode.java,
        gnu/xml/dom/DomPI.java,
        gnu/xml/dom/DomProcessingInstruction.java,
        gnu/xml/dom/DomText.java,
        gnu/xml/dom/DomLSEx.java,
        gnu/xml/dom/DomLSException.java,
        gnu/xml/dom/DomLSParser.java,
        gnu/xml/dom/DomLSSerializer.java: Refactoring of exception and DOM
        implementation class names to conform to Classpath guidelines.  Make
        DomLSException use JDK 1.4+ exception chaining.
        * gnu/xml/util/SAXNullTransformerFactory.java,
        gnu/xml/xpath/Predicate.java: Use constants relative to
        declaring class or interface.

From-SVN: r95114

30 files changed:
libjava/ChangeLog
libjava/Makefile.am
libjava/Makefile.in
libjava/gnu/xml/aelfred2/SAXDriver.java
libjava/gnu/xml/dom/DomAttr.java
libjava/gnu/xml/dom/DomCDATA.java [deleted file]
libjava/gnu/xml/dom/DomCDATASection.java [new file with mode: 0644]
libjava/gnu/xml/dom/DomCharacterData.java
libjava/gnu/xml/dom/DomDOMException.java [new file with mode: 0644]
libjava/gnu/xml/dom/DomDoctype.java
libjava/gnu/xml/dom/DomDocument.java
libjava/gnu/xml/dom/DomDocumentConfiguration.java
libjava/gnu/xml/dom/DomDocumentFragment.java [new file with mode: 0644]
libjava/gnu/xml/dom/DomElement.java
libjava/gnu/xml/dom/DomEx.java [deleted file]
libjava/gnu/xml/dom/DomFragment.java [deleted file]
libjava/gnu/xml/dom/DomImpl.java
libjava/gnu/xml/dom/DomIterator.java
libjava/gnu/xml/dom/DomNamedNodeMap.java
libjava/gnu/xml/dom/DomNode.java
libjava/gnu/xml/dom/DomNsNode.java
libjava/gnu/xml/dom/DomPI.java [deleted file]
libjava/gnu/xml/dom/DomProcessingInstruction.java [new file with mode: 0644]
libjava/gnu/xml/dom/DomText.java
libjava/gnu/xml/dom/ls/DomLSEx.java [deleted file]
libjava/gnu/xml/dom/ls/DomLSException.java [new file with mode: 0644]
libjava/gnu/xml/dom/ls/DomLSParser.java
libjava/gnu/xml/dom/ls/DomLSSerializer.java
libjava/gnu/xml/util/SAXNullTransformerFactory.java
libjava/gnu/xml/xpath/Predicate.java

index fdfd3c2e94d45ae3bebb7fac3b20f46b0891aa35..f15fb2720ad0d8f50987d7fdd0d4f915083e5867 100644 (file)
@@ -1,3 +1,58 @@
+2005-02-16  Mark Wielaard  <mark@klomp.org>
+
+       * Makefile.am (gnu_xml_source_files): Removed
+       gnu/xml/dom/DomCDATA.java, gnu/xml/dom/DomEx.java,
+       gnu/xml/dom/DomFragment.java, gnu/xml/dom/DomPI.java and
+       gnu/xml/dom/ls/DomLSEx.java. Replaced by adding
+       gnu/xml/dom/DomCDATASection.java, gnu/xml/dom/DomDOMException.java,
+       gnu/xml/dom/DomDocumentFragment.java,
+       gnu/xml/dom/DomProcessingInstruction.java and
+       gnu/xml/dom/ls/DomLSException.java.
+       * Makefile.in: Regenerated.
+
+2005-02-16  Tom Tromey  <tromey@redhat.com>
+
+       * gnu/xml/aelfred2/SAXDriver.java: Ensure that null is returned when
+       attribute index is out of bounds.
+
+2005-02-16  Chris Burdess  <dog@gnu.org>
+
+       * gnu/xml/aelfred2/SAXDriver.java: Corrected implementation of
+       isDeclared methods. Improved performance of isSpecified methods.
+
+2005-02-16  Chris Burdess  <dog@gnu.org>
+
+       Fixes bug libgcj/19864
+       * gnu/xml/dom/DomAttr.java,
+       gnu/xml/dom/DomCDATA.java,
+       gnu/xml/dom/DomCDATASection.java,
+       gnu/xml/dom/DomCharacterData.java,
+       gnu/xml/dom/DomDOMException.java,
+       gnu/xml/dom/DomDoctype.java,
+       gnu/xml/dom/DomDocument.java,
+       gnu/xml/dom/DomDocumentConfiguration.java,
+       gnu/xml/dom/DomDocumentFragment.java,
+       gnu/xml/dom/DomElement.java,
+       gnu/xml/dom/DomEx.java,
+       gnu/xml/dom/DomFragment.java,
+       gnu/xml/dom/DomImpl.java,
+       gnu/xml/dom/DomIterator.java,
+       gnu/xml/dom/DomNamedNodeMap.java,
+       gnu/xml/dom/DomNode.java,
+       gnu/xml/dom/DomNsNode.java,
+       gnu/xml/dom/DomPI.java,
+       gnu/xml/dom/DomProcessingInstruction.java,
+       gnu/xml/dom/DomText.java,
+       gnu/xml/dom/DomLSEx.java,
+       gnu/xml/dom/DomLSException.java,
+       gnu/xml/dom/DomLSParser.java,
+       gnu/xml/dom/DomLSSerializer.java: Refactoring of exception and DOM
+       implementation class names to conform to Classpath guidelines.  Make
+       DomLSException use JDK 1.4+ exception chaining.
+       * gnu/xml/util/SAXNullTransformerFactory.java,
+       gnu/xml/xpath/Predicate.java: Use constants relative to 
+       declaring class or interface.
+
 2005-02-16  Andrew Haley  <aph@redhat.com>
 
 
index 03e3450c10e786c4fb40d12374a96fcceed7486e..dd499f33237b4381c9159d2a1be583becb7f17f8 100644 (file)
@@ -2498,10 +2498,9 @@ gnu/xml/util/Resolver.java \
 gnu/xml/util/DoParse.java \
 gnu/xml/util/XHTMLWriter.java \
 gnu/xml/util/SAXNullTransformerFactory.java \
-gnu/xml/dom/DomCDATA.java \
 gnu/xml/dom/DomXPathNSResolver.java \
-gnu/xml/dom/ls/DomLSEx.java \
 gnu/xml/dom/ls/FilteredSAXEventSink.java \
+gnu/xml/dom/ls/DomLSException.java \
 gnu/xml/dom/ls/DomLSSerializer.java \
 gnu/xml/dom/ls/DomLSInput.java \
 gnu/xml/dom/ls/DomLSOutput.java        \
@@ -2512,14 +2511,14 @@ gnu/xml/dom/ls/WriterOutputStream.java \
 gnu/xml/dom/DomElement.java \
 gnu/xml/dom/DomNsNode.java \
 gnu/xml/dom/DomAttr.java \
-gnu/xml/dom/DomPI.java \
 gnu/xml/dom/DTDAttributeTypeInfo.java \
 gnu/xml/dom/DomDocumentBuilder.java \
 gnu/xml/dom/DTDElementTypeInfo.java \
-gnu/xml/dom/DomEx.java \
 gnu/xml/dom/DomDocument.java \
 gnu/xml/dom/DomXPathExpression.java \
 gnu/xml/dom/DomDocumentConfiguration.java \
+gnu/xml/dom/DomDocumentFragment.java \
+gnu/xml/dom/DomProcessingInstruction.java \
 gnu/xml/dom/Consumer.java \
 gnu/xml/dom/DomComment.java \
 gnu/xml/dom/DomCharacterData.java \
@@ -2539,9 +2538,10 @@ gnu/xml/dom/DomNodeIterator.java \
 gnu/xml/dom/DomNotation.java \
 gnu/xml/dom/JAXPFactory.java \
 gnu/xml/dom/DomIterator.java \
-gnu/xml/dom/DomFragment.java \
 gnu/xml/dom/DomEvent.java \
 gnu/xml/dom/DomEntity.java \
+gnu/xml/dom/DomCDATASection.java \
+gnu/xml/dom/DomDOMException.java \
 gnu/xml/transform/GenerateIdFunction.java \
 gnu/xml/transform/FormatNumberFunction.java \
 gnu/xml/transform/ValueOfNode.java \
index 7b311587ccad06327fde4ff612ff591ed4f7101d..bb42f66420d242c03c7cfefbd6bfadc4b0fcc8c5 100644 (file)
@@ -2443,9 +2443,9 @@ am__libgcj0_convenience_la_SOURCES_DIST = prims.cc jni.cc exception.cc \
        gnu/xml/util/Resolver.java gnu/xml/util/DoParse.java \
        gnu/xml/util/XHTMLWriter.java \
        gnu/xml/util/SAXNullTransformerFactory.java \
-       gnu/xml/dom/DomCDATA.java gnu/xml/dom/DomXPathNSResolver.java \
-       gnu/xml/dom/ls/DomLSEx.java \
+       gnu/xml/dom/DomXPathNSResolver.java \
        gnu/xml/dom/ls/FilteredSAXEventSink.java \
+       gnu/xml/dom/ls/DomLSException.java \
        gnu/xml/dom/ls/DomLSSerializer.java \
        gnu/xml/dom/ls/DomLSInput.java gnu/xml/dom/ls/DomLSOutput.java \
        gnu/xml/dom/ls/SAXEventSink.java \
@@ -2453,13 +2453,14 @@ am__libgcj0_convenience_la_SOURCES_DIST = prims.cc jni.cc exception.cc \
        gnu/xml/dom/ls/ReaderInputStream.java \
        gnu/xml/dom/ls/WriterOutputStream.java \
        gnu/xml/dom/DomElement.java gnu/xml/dom/DomNsNode.java \
-       gnu/xml/dom/DomAttr.java gnu/xml/dom/DomPI.java \
-       gnu/xml/dom/DTDAttributeTypeInfo.java \
+       gnu/xml/dom/DomAttr.java gnu/xml/dom/DTDAttributeTypeInfo.java \
        gnu/xml/dom/DomDocumentBuilder.java \
-       gnu/xml/dom/DTDElementTypeInfo.java gnu/xml/dom/DomEx.java \
+       gnu/xml/dom/DTDElementTypeInfo.java \
        gnu/xml/dom/DomDocument.java \
        gnu/xml/dom/DomXPathExpression.java \
        gnu/xml/dom/DomDocumentConfiguration.java \
+       gnu/xml/dom/DomDocumentFragment.java \
+       gnu/xml/dom/DomProcessingInstruction.java \
        gnu/xml/dom/Consumer.java gnu/xml/dom/DomComment.java \
        gnu/xml/dom/DomCharacterData.java gnu/xml/dom/DomExtern.java \
        gnu/xml/dom/DomEntityReference.java \
@@ -2472,8 +2473,9 @@ am__libgcj0_convenience_la_SOURCES_DIST = prims.cc jni.cc exception.cc \
        gnu/xml/dom/DomText.java gnu/xml/dom/DomNSResolverContext.java \
        gnu/xml/dom/DomNodeIterator.java gnu/xml/dom/DomNotation.java \
        gnu/xml/dom/JAXPFactory.java gnu/xml/dom/DomIterator.java \
-       gnu/xml/dom/DomFragment.java gnu/xml/dom/DomEvent.java \
-       gnu/xml/dom/DomEntity.java \
+       gnu/xml/dom/DomEvent.java gnu/xml/dom/DomEntity.java \
+       gnu/xml/dom/DomCDATASection.java \
+       gnu/xml/dom/DomDOMException.java \
        gnu/xml/transform/GenerateIdFunction.java \
        gnu/xml/transform/FormatNumberFunction.java \
        gnu/xml/transform/ValueOfNode.java \
@@ -4502,20 +4504,22 @@ am__objects_17 = gnu/xml/xpath/EqualityExpr.lo \
        gnu/xml/util/Resolver.lo gnu/xml/util/DoParse.lo \
        gnu/xml/util/XHTMLWriter.lo \
        gnu/xml/util/SAXNullTransformerFactory.lo \
-       gnu/xml/dom/DomCDATA.lo gnu/xml/dom/DomXPathNSResolver.lo \
-       gnu/xml/dom/ls/DomLSEx.lo \
+       gnu/xml/dom/DomXPathNSResolver.lo \
        gnu/xml/dom/ls/FilteredSAXEventSink.lo \
+       gnu/xml/dom/ls/DomLSException.lo \
        gnu/xml/dom/ls/DomLSSerializer.lo gnu/xml/dom/ls/DomLSInput.lo \
        gnu/xml/dom/ls/DomLSOutput.lo gnu/xml/dom/ls/SAXEventSink.lo \
        gnu/xml/dom/ls/DomLSParser.lo \
        gnu/xml/dom/ls/ReaderInputStream.lo \
        gnu/xml/dom/ls/WriterOutputStream.lo gnu/xml/dom/DomElement.lo \
        gnu/xml/dom/DomNsNode.lo gnu/xml/dom/DomAttr.lo \
-       gnu/xml/dom/DomPI.lo gnu/xml/dom/DTDAttributeTypeInfo.lo \
+       gnu/xml/dom/DTDAttributeTypeInfo.lo \
        gnu/xml/dom/DomDocumentBuilder.lo \
-       gnu/xml/dom/DTDElementTypeInfo.lo gnu/xml/dom/DomEx.lo \
-       gnu/xml/dom/DomDocument.lo gnu/xml/dom/DomXPathExpression.lo \
+       gnu/xml/dom/DTDElementTypeInfo.lo gnu/xml/dom/DomDocument.lo \
+       gnu/xml/dom/DomXPathExpression.lo \
        gnu/xml/dom/DomDocumentConfiguration.lo \
+       gnu/xml/dom/DomDocumentFragment.lo \
+       gnu/xml/dom/DomProcessingInstruction.lo \
        gnu/xml/dom/Consumer.lo gnu/xml/dom/DomComment.lo \
        gnu/xml/dom/DomCharacterData.lo gnu/xml/dom/DomExtern.lo \
        gnu/xml/dom/DomEntityReference.lo \
@@ -4528,8 +4532,8 @@ am__objects_17 = gnu/xml/xpath/EqualityExpr.lo \
        gnu/xml/dom/DomText.lo gnu/xml/dom/DomNSResolverContext.lo \
        gnu/xml/dom/DomNodeIterator.lo gnu/xml/dom/DomNotation.lo \
        gnu/xml/dom/JAXPFactory.lo gnu/xml/dom/DomIterator.lo \
-       gnu/xml/dom/DomFragment.lo gnu/xml/dom/DomEvent.lo \
-       gnu/xml/dom/DomEntity.lo \
+       gnu/xml/dom/DomEvent.lo gnu/xml/dom/DomEntity.lo \
+       gnu/xml/dom/DomCDATASection.lo gnu/xml/dom/DomDOMException.lo \
        gnu/xml/transform/GenerateIdFunction.lo \
        gnu/xml/transform/FormatNumberFunction.lo \
        gnu/xml/transform/ValueOfNode.lo \
@@ -6740,10 +6744,9 @@ gnu/xml/util/Resolver.java \
 gnu/xml/util/DoParse.java \
 gnu/xml/util/XHTMLWriter.java \
 gnu/xml/util/SAXNullTransformerFactory.java \
-gnu/xml/dom/DomCDATA.java \
 gnu/xml/dom/DomXPathNSResolver.java \
-gnu/xml/dom/ls/DomLSEx.java \
 gnu/xml/dom/ls/FilteredSAXEventSink.java \
+gnu/xml/dom/ls/DomLSException.java \
 gnu/xml/dom/ls/DomLSSerializer.java \
 gnu/xml/dom/ls/DomLSInput.java \
 gnu/xml/dom/ls/DomLSOutput.java        \
@@ -6754,14 +6757,14 @@ gnu/xml/dom/ls/WriterOutputStream.java \
 gnu/xml/dom/DomElement.java \
 gnu/xml/dom/DomNsNode.java \
 gnu/xml/dom/DomAttr.java \
-gnu/xml/dom/DomPI.java \
 gnu/xml/dom/DTDAttributeTypeInfo.java \
 gnu/xml/dom/DomDocumentBuilder.java \
 gnu/xml/dom/DTDElementTypeInfo.java \
-gnu/xml/dom/DomEx.java \
 gnu/xml/dom/DomDocument.java \
 gnu/xml/dom/DomXPathExpression.java \
 gnu/xml/dom/DomDocumentConfiguration.java \
+gnu/xml/dom/DomDocumentFragment.java \
+gnu/xml/dom/DomProcessingInstruction.java \
 gnu/xml/dom/Consumer.java \
 gnu/xml/dom/DomComment.java \
 gnu/xml/dom/DomCharacterData.java \
@@ -6781,9 +6784,10 @@ gnu/xml/dom/DomNodeIterator.java \
 gnu/xml/dom/DomNotation.java \
 gnu/xml/dom/JAXPFactory.java \
 gnu/xml/dom/DomIterator.java \
-gnu/xml/dom/DomFragment.java \
 gnu/xml/dom/DomEvent.java \
 gnu/xml/dom/DomEntity.java \
+gnu/xml/dom/DomCDATASection.java \
+gnu/xml/dom/DomDOMException.java \
 gnu/xml/transform/GenerateIdFunction.java \
 gnu/xml/transform/FormatNumberFunction.java \
 gnu/xml/transform/ValueOfNode.java \
@@ -15436,8 +15440,6 @@ gnu/xml/dom/$(am__dirstamp):
 gnu/xml/dom/$(DEPDIR)/$(am__dirstamp):
        @$(mkdir_p) gnu/xml/dom/$(DEPDIR)
        @: > gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomCDATA.lo: gnu/xml/dom/$(am__dirstamp) \
-       gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/DomXPathNSResolver.lo: gnu/xml/dom/$(am__dirstamp) \
        gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/ls/$(am__dirstamp):
@@ -15446,11 +15448,11 @@ gnu/xml/dom/ls/$(am__dirstamp):
 gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp):
        @$(mkdir_p) gnu/xml/dom/ls/$(DEPDIR)
        @: > gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/ls/DomLSEx.lo: gnu/xml/dom/ls/$(am__dirstamp) \
-       gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/ls/FilteredSAXEventSink.lo:  \
        gnu/xml/dom/ls/$(am__dirstamp) \
        gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
+gnu/xml/dom/ls/DomLSException.lo: gnu/xml/dom/ls/$(am__dirstamp) \
+       gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/ls/DomLSSerializer.lo: gnu/xml/dom/ls/$(am__dirstamp) \
        gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/ls/DomLSInput.lo: gnu/xml/dom/ls/$(am__dirstamp) \
@@ -15471,22 +15473,22 @@ gnu/xml/dom/DomNsNode.lo: gnu/xml/dom/$(am__dirstamp) \
        gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/DomAttr.lo: gnu/xml/dom/$(am__dirstamp) \
        gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomPI.lo: gnu/xml/dom/$(am__dirstamp) \
-       gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/DTDAttributeTypeInfo.lo: gnu/xml/dom/$(am__dirstamp) \
        gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/DomDocumentBuilder.lo: gnu/xml/dom/$(am__dirstamp) \
        gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/DTDElementTypeInfo.lo: gnu/xml/dom/$(am__dirstamp) \
        gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomEx.lo: gnu/xml/dom/$(am__dirstamp) \
-       gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/DomDocument.lo: gnu/xml/dom/$(am__dirstamp) \
        gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/DomXPathExpression.lo: gnu/xml/dom/$(am__dirstamp) \
        gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/DomDocumentConfiguration.lo: gnu/xml/dom/$(am__dirstamp) \
        gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
+gnu/xml/dom/DomDocumentFragment.lo: gnu/xml/dom/$(am__dirstamp) \
+       gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
+gnu/xml/dom/DomProcessingInstruction.lo: gnu/xml/dom/$(am__dirstamp) \
+       gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/Consumer.lo: gnu/xml/dom/$(am__dirstamp) \
        gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/DomComment.lo: gnu/xml/dom/$(am__dirstamp) \
@@ -15525,12 +15527,14 @@ gnu/xml/dom/JAXPFactory.lo: gnu/xml/dom/$(am__dirstamp) \
        gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/DomIterator.lo: gnu/xml/dom/$(am__dirstamp) \
        gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomFragment.lo: gnu/xml/dom/$(am__dirstamp) \
-       gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/DomEvent.lo: gnu/xml/dom/$(am__dirstamp) \
        gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/dom/DomEntity.lo: gnu/xml/dom/$(am__dirstamp) \
        gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
+gnu/xml/dom/DomCDATASection.lo: gnu/xml/dom/$(am__dirstamp) \
+       gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
+gnu/xml/dom/DomDOMException.lo: gnu/xml/dom/$(am__dirstamp) \
+       gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
 gnu/xml/transform/$(am__dirstamp):
        @$(mkdir_p) gnu/xml/transform
        @: > gnu/xml/transform/$(am__dirstamp)
@@ -16923,12 +16927,14 @@ mostlyclean-compile:
        -rm -f gnu/xml/dom/DTDElementTypeInfo.lo
        -rm -f gnu/xml/dom/DomAttr.$(OBJEXT)
        -rm -f gnu/xml/dom/DomAttr.lo
-       -rm -f gnu/xml/dom/DomCDATA.$(OBJEXT)
-       -rm -f gnu/xml/dom/DomCDATA.lo
+       -rm -f gnu/xml/dom/DomCDATASection.$(OBJEXT)
+       -rm -f gnu/xml/dom/DomCDATASection.lo
        -rm -f gnu/xml/dom/DomCharacterData.$(OBJEXT)
        -rm -f gnu/xml/dom/DomCharacterData.lo
        -rm -f gnu/xml/dom/DomComment.$(OBJEXT)
        -rm -f gnu/xml/dom/DomComment.lo
+       -rm -f gnu/xml/dom/DomDOMException.$(OBJEXT)
+       -rm -f gnu/xml/dom/DomDOMException.lo
        -rm -f gnu/xml/dom/DomDoctype.$(OBJEXT)
        -rm -f gnu/xml/dom/DomDoctype.lo
        -rm -f gnu/xml/dom/DomDocument.$(OBJEXT)
@@ -16939,6 +16945,8 @@ mostlyclean-compile:
        -rm -f gnu/xml/dom/DomDocumentBuilderFactory.lo
        -rm -f gnu/xml/dom/DomDocumentConfiguration.$(OBJEXT)
        -rm -f gnu/xml/dom/DomDocumentConfiguration.lo
+       -rm -f gnu/xml/dom/DomDocumentFragment.$(OBJEXT)
+       -rm -f gnu/xml/dom/DomDocumentFragment.lo
        -rm -f gnu/xml/dom/DomElement.$(OBJEXT)
        -rm -f gnu/xml/dom/DomElement.lo
        -rm -f gnu/xml/dom/DomEntity.$(OBJEXT)
@@ -16947,12 +16955,8 @@ mostlyclean-compile:
        -rm -f gnu/xml/dom/DomEntityReference.lo
        -rm -f gnu/xml/dom/DomEvent.$(OBJEXT)
        -rm -f gnu/xml/dom/DomEvent.lo
-       -rm -f gnu/xml/dom/DomEx.$(OBJEXT)
-       -rm -f gnu/xml/dom/DomEx.lo
        -rm -f gnu/xml/dom/DomExtern.$(OBJEXT)
        -rm -f gnu/xml/dom/DomExtern.lo
-       -rm -f gnu/xml/dom/DomFragment.$(OBJEXT)
-       -rm -f gnu/xml/dom/DomFragment.lo
        -rm -f gnu/xml/dom/DomImpl.$(OBJEXT)
        -rm -f gnu/xml/dom/DomImpl.lo
        -rm -f gnu/xml/dom/DomIterator.$(OBJEXT)
@@ -16969,8 +16973,8 @@ mostlyclean-compile:
        -rm -f gnu/xml/dom/DomNotation.lo
        -rm -f gnu/xml/dom/DomNsNode.$(OBJEXT)
        -rm -f gnu/xml/dom/DomNsNode.lo
-       -rm -f gnu/xml/dom/DomPI.$(OBJEXT)
-       -rm -f gnu/xml/dom/DomPI.lo
+       -rm -f gnu/xml/dom/DomProcessingInstruction.$(OBJEXT)
+       -rm -f gnu/xml/dom/DomProcessingInstruction.lo
        -rm -f gnu/xml/dom/DomText.$(OBJEXT)
        -rm -f gnu/xml/dom/DomText.lo
        -rm -f gnu/xml/dom/DomXPathExpression.$(OBJEXT)
@@ -16985,8 +16989,8 @@ mostlyclean-compile:
        -rm -f gnu/xml/dom/ImplementationSource.lo
        -rm -f gnu/xml/dom/JAXPFactory.$(OBJEXT)
        -rm -f gnu/xml/dom/JAXPFactory.lo
-       -rm -f gnu/xml/dom/ls/DomLSEx.$(OBJEXT)
-       -rm -f gnu/xml/dom/ls/DomLSEx.lo
+       -rm -f gnu/xml/dom/ls/DomLSException.$(OBJEXT)
+       -rm -f gnu/xml/dom/ls/DomLSException.lo
        -rm -f gnu/xml/dom/ls/DomLSInput.$(OBJEXT)
        -rm -f gnu/xml/dom/ls/DomLSInput.lo
        -rm -f gnu/xml/dom/ls/DomLSOutput.$(OBJEXT)
@@ -21884,21 +21888,21 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DTDAttributeTypeInfo.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DTDElementTypeInfo.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomAttr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomCDATA.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomCDATASection.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomCharacterData.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomComment.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomDOMException.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomDoctype.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomDocument.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomDocumentBuilder.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomDocumentBuilderFactory.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomDocumentConfiguration.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomDocumentFragment.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomElement.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomEntity.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomEntityReference.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomEvent.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomEx.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomExtern.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomFragment.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomImpl.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomIterator.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomNSResolverContext.Plo@am__quote@
@@ -21907,7 +21911,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomNodeIterator.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomNotation.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomNsNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomPI.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomProcessingInstruction.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomText.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomXPathExpression.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomXPathNSResolver.Plo@am__quote@
@@ -21915,7 +21919,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/ImplementationList.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/ImplementationSource.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/JAXPFactory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/ls/$(DEPDIR)/DomLSEx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/ls/$(DEPDIR)/DomLSException.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/ls/$(DEPDIR)/DomLSInput.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/ls/$(DEPDIR)/DomLSOutput.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/ls/$(DEPDIR)/DomLSParser.Plo@am__quote@
index 4912f27946476b395e48bc37c89f537c1a70adb2..0e7b3c719a60c825ffc5b1f9b0e701fa6e200754 100644 (file)
@@ -150,10 +150,7 @@ final public class SAXDriver
     private Stack                      entityStack;
 
     // one vector (of object/struct): faster, smaller
-    private List                       attributesList = Collections.synchronizedList(new ArrayList());
-  
-    private boolean                    attributeSpecified [] = new boolean[10];
-    private boolean                    attributeDeclared [] = new boolean[10];
+    private List                       attributesList;
 
     private boolean                    namespaces = true;
     private boolean                    xmlNames = false;
@@ -183,8 +180,6 @@ final public class SAXDriver
       elementName = null;
       entityStack = new Stack ();
       attributesList = Collections.synchronizedList(new ArrayList());
-      attributeSpecified = new boolean[10];
-      attributeDeclared = new boolean[10];
       attributeCount = 0;
       attributes = false;
       nsTemp = new String[3];
@@ -849,17 +844,10 @@ final public class SAXDriver
   }
        // remember this attribute ...
 
-       if (attributeCount == attributeSpecified.length) {      // grow array?
-           boolean temp [] = new boolean [attributeSpecified.length + 5];
-           System.arraycopy (attributeSpecified, 0, temp, 0, attributeCount);
-           attributeSpecified = temp;
-       }
-       attributeSpecified [attributeCount] = isSpecified;
-
        attributeCount++;
        
        // attribute type comes from querying parser's DTD records
-       attributesList.add(new Attribute(qname, value));
+       attributesList.add(new Attribute(qname, value, isSpecified));
 
     }
 
@@ -1043,7 +1031,7 @@ final public class SAXDriver
      */
     public int getLength ()
     {
-       return attributesList.size ();
+       return attributesList.size();
     }
 
     /**
@@ -1051,7 +1039,11 @@ final public class SAXDriver
      */
     public String getURI (int index)
     {
-       return ((Attribute) attributesList.get (index)).nameSpace;
+        if (index < 0 || index >= attributesList.size())
+          {
+            return null;
+          }
+       return ((Attribute) attributesList.get(index)).nameSpace;
     }
 
     /**
@@ -1059,7 +1051,11 @@ final public class SAXDriver
      */
     public String getLocalName (int index)
     {
-        Attribute attr = (Attribute) attributesList.get (index);
+        if (index < 0 || index >= attributesList.size())
+          {
+            return null;
+          }
+        Attribute attr = (Attribute) attributesList.get(index);
         // FIXME attr.localName is sometimes null, why?
         if (namespaces && attr.localName == null)
           {
@@ -1068,38 +1064,51 @@ final public class SAXDriver
             attr.localName = (ci == -1) ? attr.name :
               attr.name.substring(ci + 1);
           }
-        return attr.localName;
+        return (attr.localName == null) ? "" : attr.localName;
     }
 
     /**
      * <b>SAX2 Attributes</b> method (don't invoke on parser);
      */
-    public String getQName (int i)
+    public String getQName (int index)
     {
-       return ((Attribute) attributesList.get (i)).name;
+        if (index < 0 || index >= attributesList.size())
+          {
+            return null;
+          }
+        Attribute attr = (Attribute) attributesList.get(index);
+       return (attr.name == null) ? "" : attr.name;
     }
 
     /**
      * <b>SAX1 AttributeList</b> method (don't invoke on parser);
      */
-    public String getName (int i)
+    public String getName (int index)
     {
-       return ((Attribute) attributesList.get (i)).name;
+       return getQName(index);
     }
 
     /**
      * <b>SAX1 AttributeList, SAX2 Attributes</b> method
      * (don't invoke on parser);
      */
-    public String getType (int i)
+    public String getType (int index)
     {
-       String  type = parser.getAttributeType (elementName, getQName (i));
+        if (index < 0 || index >= attributesList.size())
+          {
+            return null;
+          }
+       String  type = parser.getAttributeType(elementName, getQName(index));
        if (type == null)
+          {
            return "CDATA";
+          }
        // ... use DeclHandler.attributeDecl to see enumerations
-      if (type == "ENUMERATION")
-        return "NMTOKEN";
-       return type;
+        if (type == "ENUMERATION")
+          {
+            return "NMTOKEN";
+          }
+        return type;
     }
 
 
@@ -1107,9 +1116,13 @@ final public class SAXDriver
      * <b>SAX1 AttributeList, SAX2 Attributes</b> method
      * (don't invoke on parser);
      */
-    public String getValue (int i)
+    public String getValue (int index)
     {
-       return ((Attribute) attributesList.get (i)).value;
+        if (index < 0 || index >= attributesList.size())
+          {
+            return null;
+          }
+       return ((Attribute) attributesList.get(index)).value;
     }
 
 
@@ -1118,14 +1131,19 @@ final public class SAXDriver
      */
     public int getIndex (String uri, String local)
     {
-       int length = getLength ();
+       int length = getLength();
 
-       for (int i = 0; i < length; i++) {
-           if (!getURI (i).equals (uri))
+       for (int i = 0; i < length; i++)
+          {
+            if (!getURI(i).equals(uri))
+              {
                continue;
-           if (getLocalName (i).equals (local))
+              }
+           if (getLocalName(i).equals(local))
+              {
                return i;
-       }
+              }
+          }
        return -1;
     }
 
@@ -1135,12 +1153,15 @@ final public class SAXDriver
      */
     public int getIndex (String xmlName)
     {
-       int length = getLength ();
+       int length = getLength();
 
-       for (int i = 0; i < length; i++) {
-           if (getQName (i).equals (xmlName))
+       for (int i = 0; i < length; i++)
+          {
+            if (getQName(i).equals(xmlName))
+              {
                return i;
-       }
+              }
+          }
        return -1;
     }
 
@@ -1150,11 +1171,13 @@ final public class SAXDriver
      */
     public String getType (String uri, String local)
     {
-       int index = getIndex (uri, local);
+       int index = getIndex(uri, local);
 
        if (index < 0)
+          {
            return null;
-       return getType (index);
+          }
+       return getType(index);
     }
 
 
@@ -1164,11 +1187,13 @@ final public class SAXDriver
      */
     public String getType (String xmlName)
     {
-       int index = getIndex (xmlName);
+       int index = getIndex(xmlName);
 
        if (index < 0)
+          {
            return null;
-       return getType (index);
+          }
+       return getType(index);
     }
 
 
@@ -1177,11 +1202,13 @@ final public class SAXDriver
      */
     public String getValue (String uri, String local)
     {
-       int index = getIndex (uri, local);
+       int index = getIndex(uri, local);
 
        if (index < 0)
+          {
            return null;
-       return getValue (index);
+          }
+       return getValue(index);
     }
 
 
@@ -1191,11 +1218,13 @@ final public class SAXDriver
      */
     public String getValue (String xmlName)
     {
-       int index = getIndex (xmlName);
+       int index = getIndex(xmlName);
 
        if (index < 0)
+          {
            return null;
-       return getValue (index);
+          }
+       return getValue(index);
     }
 
 
@@ -1212,31 +1241,31 @@ final public class SAXDriver
     {
        if (index < 0 || index >= attributeCount) 
            throw new ArrayIndexOutOfBoundsException ();
-       return attributeDeclared [index];
+        String type = parser.getAttributeType(elementName, getQName(index));
+        return (type != null);
     }
 
     /** @return false unless the attribute was declared in the DTD.
      * @throws java.lang.IllegalArgumentException
      *   When the supplied names do not identify an attribute.
      */
-    public boolean isDeclared (java.lang.String qName)
+    public boolean isDeclared (String qName)
     {
        int index = getIndex (qName);
        if (index < 0)
            throw new IllegalArgumentException ();
-       return attributeDeclared [index];
+        String type = parser.getAttributeType(elementName, qName);
+        return (type != null);
     }
 
     /** @return false unless the attribute was declared in the DTD.
      * @throws java.lang.IllegalArgumentException
      *   When the supplied names do not identify an attribute.
      */
-    public boolean isDeclared (java.lang.String uri, java.lang.String localName)
+    public boolean isDeclared (String uri, String localName)
     {
        int index = getIndex (uri, localName);
-       if (index < 0)
-           throw new IllegalArgumentException ();
-       return attributeDeclared [index];
+        return isDeclared(index);
     }
 
 
@@ -1245,9 +1274,7 @@ final public class SAXDriver
      */
     public boolean isSpecified (int index)
     {
-       if (index < 0 || index >= attributeCount) 
-           throw new ArrayIndexOutOfBoundsException ();
-       return attributeSpecified [index];
+       return ((Attribute) attributesList.get(index)).specified;
     }
 
     /**
@@ -1256,10 +1283,7 @@ final public class SAXDriver
     public boolean isSpecified (String uri, String local)
     {
        int index = getIndex (uri, local);
-
-       if (index < 0)
-           throw new IllegalArgumentException ();
-       return attributeSpecified [index];
+        return isSpecified(index);
     }
 
     /**
@@ -1268,10 +1292,7 @@ final public class SAXDriver
     public boolean isSpecified (String xmlName)
     {
        int index = getIndex (xmlName);
-
-       if (index < 0)
-           throw new IllegalArgumentException ();
-       return attributeSpecified [index];
+        return isSpecified(index);
     }
 
 
@@ -1374,12 +1395,14 @@ class Attribute
     String value;
     String nameSpace;
     String localName;
+    boolean specified;
 
-    Attribute(String name, String value)
+    Attribute(String name, String value, boolean specified)
     {
         this.name = name;
         this.value = value;
         this.nameSpace = "";
+        this.specified = specified;
     }
 }
 
index 2890430e3156e53d4a86f7bdea833446f76e9d29..555902e3ea3597d5e84c0978efcaa324d82553c2 100644 (file)
@@ -38,6 +38,7 @@ exception statement from your version. */
 package gnu.xml.dom;
 
 import org.w3c.dom.Attr;
+import org.w3c.dom.DOMException;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.TypeInfo;
@@ -194,7 +195,7 @@ public class DomAttr
   {
     if (readonly)
       {
-        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
       }
     if (value == null)
       {
@@ -284,11 +285,11 @@ public class DomAttr
   {
     if (parent != null)
       {
-        throw new DomEx (DomEx.HIERARCHY_REQUEST_ERR);
+        throw new DomDOMException(DOMException.HIERARCHY_REQUEST_ERR);
       }
     if (!(e instanceof DomElement))
       {
-        throw new DomEx(DomEx.WRONG_DOCUMENT_ERR);
+        throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR);
       }
     parent = (DomElement) e;
     depth = parent.depth + 1;
diff --git a/libjava/gnu/xml/dom/DomCDATA.java b/libjava/gnu/xml/dom/DomCDATA.java
deleted file mode 100644 (file)
index f6f471c..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/* DomCDATA.java -- 
-   Copyright (C) 1999,2000,2001,2004 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., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 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 gnu.xml.dom;
-
-import org.w3c.dom.CDATASection;
-
-/**
- * <p> "CDATASection" implementation.
- * This is a non-core DOM class, supporting the "XML" feature.
- * CDATA sections are just ways to represent text using different
- * delimeters. </p>
- *
- * <p> <em>You are strongly advised not to use CDATASection nodes.</em>
- * The advantage of having slightly prettier ways to print text that may
- * have lots of embedded XML delimiters, such as "&amp;" and "&lt;",
- * can be dwarfed by the cost of dealing with multiple kinds of text
- * nodes in all your algorithms. </p>
- *
- * @author David Brownell
- * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
- */
-public class DomCDATA
-  extends DomText
-  implements CDATASection
-{
-  
-  /**
-   * Constructs a CDATA section node associated with the specified
-   * document and holding the specified data.
-   *
-   * <p>This constructor should only be invoked by a Document as part of
-   * its createCDATASection functionality, or through a subclass which is
-   * similarly used in a "Sub-DOM" style layer.
-   *
-   */
-  protected DomCDATA(DomDocument owner, String value)
-  {
-    super(CDATA_SECTION_NODE, owner, value);
-  }
-
-  protected DomCDATA(DomDocument owner, char buf [], int off, int len)
-  {
-    super(CDATA_SECTION_NODE, owner, buf, off, len);
-  }
-
-  /**
-   * <b>DOM L1</b>
-   * Returns the string "#cdata-section".
-   */
-  final public String getNodeName()
-  {
-       return "#cdata-section";
-  }
-  
-}
-
diff --git a/libjava/gnu/xml/dom/DomCDATASection.java b/libjava/gnu/xml/dom/DomCDATASection.java
new file mode 100644 (file)
index 0000000..4b4dcb5
--- /dev/null
@@ -0,0 +1,91 @@
+/* DomCDATASection.java -- 
+   Copyright (C) 1999,2000,2001,2004 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., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 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 gnu.xml.dom;
+
+import org.w3c.dom.CDATASection;
+
+/**
+ * <p> "CDATASection" implementation.
+ * This is a non-core DOM class, supporting the "XML" feature.
+ * CDATA sections are just ways to represent text using different
+ * delimeters. </p>
+ *
+ * <p> <em>You are strongly advised not to use CDATASection nodes.</em>
+ * The advantage of having slightly prettier ways to print text that may
+ * have lots of embedded XML delimiters, such as "&amp;" and "&lt;",
+ * can be dwarfed by the cost of dealing with multiple kinds of text
+ * nodes in all your algorithms. </p>
+ *
+ * @author David Brownell
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomCDATASection
+  extends DomText
+  implements CDATASection
+{
+  
+  /**
+   * Constructs a CDATA section node associated with the specified
+   * document and holding the specified data.
+   *
+   * <p>This constructor should only be invoked by a Document as part of
+   * its createCDATASection functionality, or through a subclass which is
+   * similarly used in a "Sub-DOM" style layer.
+   *
+   */
+  protected DomCDATASection(DomDocument owner, String value)
+  {
+    super(CDATA_SECTION_NODE, owner, value);
+  }
+
+  protected DomCDATASection(DomDocument owner, char buf [], int off, int len)
+  {
+    super(CDATA_SECTION_NODE, owner, buf, off, len);
+  }
+
+  /**
+   * <b>DOM L1</b>
+   * Returns the string "#cdata-section".
+   */
+  final public String getNodeName()
+  {
+    return "#cdata-section";
+  }
+  
+}
+
index 48ccb82d638a2000161c8c792f2e8fb1dafa832f..fc4313e5fe53160c1d755b96d2b2daaeef942883 100644 (file)
@@ -38,6 +38,7 @@ exception statement from your version. */
 package gnu.xml.dom;
 
 import org.w3c.dom.CharacterData;
+import org.w3c.dom.DOMException;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.w3c.dom.events.MutationEvent;
@@ -82,7 +83,7 @@ public abstract class DomCharacterData
   {
     if (isReadonly())
       {
-      throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
       }
     String value = text + arg;
     mutating(value);
@@ -98,12 +99,12 @@ public abstract class DomCharacterData
   {
     if (isReadonly())
       {
-        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
       }
     char[] raw = text.toCharArray();
     if (offset < 0 || count < 0 || offset > raw.length)
       {
-        throw new DomEx(DomEx.INDEX_SIZE_ERR);
+        throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
       }
     if ((offset + count) > raw.length)
       {
@@ -125,7 +126,7 @@ public abstract class DomCharacterData
       }
     catch (IndexOutOfBoundsException x)
       {
-        throw new DomEx(DomEx.INDEX_SIZE_ERR);
+        throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
       }
   }
     
@@ -164,7 +165,7 @@ public abstract class DomCharacterData
   {
     if (isReadonly())
       {
-      throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+      throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
       }
     char[] raw = text.toCharArray();
     char[] tmp = arg.toCharArray ();
@@ -182,7 +183,7 @@ public abstract class DomCharacterData
       }
     catch (IndexOutOfBoundsException x)
       {
-        throw new DomEx(DomEx.INDEX_SIZE_ERR);
+        throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
       }
   }
     
@@ -195,14 +196,14 @@ public abstract class DomCharacterData
   {
     if (readonly)
       {
-        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
       }
     char[] raw = text.toCharArray();
     
     // deleteData
     if (offset < 0 || count < 0 || offset > raw.length)
       {
-        throw new DomEx(DomEx.INDEX_SIZE_ERR);
+        throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
       }
     if ((offset + count) > raw.length)
       {
@@ -228,7 +229,7 @@ public abstract class DomCharacterData
       }
     catch (IndexOutOfBoundsException x)
       {
-        throw new DomEx(DomEx.INDEX_SIZE_ERR);
+        throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
       }
   }
     
@@ -241,7 +242,7 @@ public abstract class DomCharacterData
   {
     if (isReadonly())
       {
-        throw new DomEx (DomEx.NO_MODIFICATION_ALLOWED_ERR);
+        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
       }
     if (value == null)
       {
@@ -276,7 +277,7 @@ public abstract class DomCharacterData
           {
             return text.substring(offset);
           }
-        throw new DomEx(DomEx.INDEX_SIZE_ERR);
+        throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
       }
   }
 
diff --git a/libjava/gnu/xml/dom/DomDOMException.java b/libjava/gnu/xml/dom/DomDOMException.java
new file mode 100644 (file)
index 0000000..a56814c
--- /dev/null
@@ -0,0 +1,175 @@
+/* DomDOMException.java -- 
+   Copyright (C) 1999,2000,2001,2004 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., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 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 gnu.xml.dom;
+
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Node;
+
+/**
+ * <p> DOMException implementation.   The version that
+ * is provided by the W3C is abstract, so it can't be instantiated.
+ *
+ * <p> This also provides a bit more information about the error
+ * that is being reported, in terms of the relevant DOM structures
+ * and data.
+ *
+ * @author David Brownell 
+ */
+public class DomDOMException
+  extends DOMException
+{
+
+  /** @serial Data that caused an error to be reported */
+  private String data;
+  
+  /** @serial Node associated with the error. */
+  private Node node;
+  
+  /** @serial Data associated with the error. */
+  private int value;
+  
+  /**
+   * Constructs an exception, with the diagnostic message
+   * corresponding to the specified code.
+   */
+  public DomDOMException(short code)
+  {
+    super(code, diagnostic(code));
+  }
+  
+  /**
+   * Constructs an exception, with the diagnostic message
+   * corresponding to the specified code and additional
+   * information as provided.
+   */
+  public DomDOMException(short code, String data, Node node, int value)
+  {
+    super(code, diagnostic(code));
+    this.data = data;
+    this.node = node;
+    this.value = value;
+  }
+
+  /** Returns the node to which the diagnotic applies, or null. */
+  final public Node getNode()
+  {
+    return node;
+  }
+
+  /** Returns data to which the diagnotic applies, or null. */
+  final public String getData()
+  {
+    return data;
+  }
+
+  /** Returns data to which the diagnotic applies, or null. */
+  final public int getValue()
+  {
+    return value;
+  }
+
+  /**
+   * Returns a diagnostic message that may be slightly more useful
+   * than the generic one, where possible.
+   */
+  public String getMessage()
+  {
+    String retval = super.getMessage();
+    
+    if (data != null)
+      {
+        retval += "\nMore Information: " + data;
+      }
+    if (value != 0)
+      {
+        retval += "\nNumber: " + value;
+      }
+    if (node != null)
+      {
+        retval += "\nNode Name: " + node.getNodeName();
+      }
+    return retval;
+  }
+
+  // these strings should be localizable.
+  
+  private static String diagnostic(short code)
+  {
+    switch (code)
+      {        
+        // DOM L1:
+      case INDEX_SIZE_ERR:
+        return "An index or size is out of range.";
+      case DOMSTRING_SIZE_ERR:
+        return "A string is too big.";
+      case HIERARCHY_REQUEST_ERR:
+        return "The node doesn't belong here.";
+      case WRONG_DOCUMENT_ERR:
+        return "The node belongs in another document.";
+      case INVALID_CHARACTER_ERR:
+        return "That character is not permitted.";
+      case NO_DATA_ALLOWED_ERR:
+        return "This node does not permit data.";
+      case NO_MODIFICATION_ALLOWED_ERR:
+        return "No changes are allowed.";
+      case NOT_FOUND_ERR:
+        return "The node was not found in that context.";
+      case NOT_SUPPORTED_ERR:
+        return "That object is not supported.";
+      case INUSE_ATTRIBUTE_ERR:
+        return "The attribute belongs to a different element.";
+        
+        // DOM L2:
+      case INVALID_STATE_ERR:
+        return "The object is not usable.";
+      case SYNTAX_ERR:
+        return "An illegal string was provided.";
+      case INVALID_MODIFICATION_ERR:
+        return "An object's type may not be changed.";
+      case NAMESPACE_ERR:
+        return "The operation violates XML Namespaces.";
+      case INVALID_ACCESS_ERR:
+        return "Parameter or operation isn't supported by this node.";
+      case TYPE_MISMATCH_ERR:
+        return "The type of the argument is incompatible with the expected type.";
+      }
+    return "Reserved exception number: " + code;
+  }
+
+}
+
index 35fb613e55ac91ae88d9c3c71bac539d6d0d634e..8c760a5317f87a2bf62346165024804928be63cc 100644 (file)
@@ -39,6 +39,7 @@ package gnu.xml.dom;
 
 import java.util.HashMap;
 import org.w3c.dom.DocumentType;
+import org.w3c.dom.DOMException;
 import org.w3c.dom.DOMImplementation;
 import org.w3c.dom.Entity;
 import org.w3c.dom.NamedNodeMap;
@@ -194,7 +195,7 @@ public class DomDoctype
       }
     if (isReadonly())
       {
-        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
       }
     getEntities();
     
@@ -250,7 +251,7 @@ public class DomDoctype
     
     if (isReadonly())
       {
-        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
       }
     getNotations();
     
index 10693ae1d58810dd6f7edc1b63178e2926cbdfce..90885716836c90ed4154b08625aebe3642958f4c 100644 (file)
@@ -292,16 +292,16 @@ public class DomDocument
     if (newChild.getNodeType() == ELEMENT_NODE
         && getDocumentElement() != null)
       {
-        throw new DomEx (DomEx.HIERARCHY_REQUEST_ERR,
-                         "document element already present: " +
-                         getDocumentElement(), newChild, 0);
+        throw new DomDOMException(DOMException.HIERARCHY_REQUEST_ERR,
+                                  "document element already present: " +
+                                  getDocumentElement(), newChild, 0);
       }
     if (newChild.getNodeType() == DOCUMENT_TYPE_NODE
         && getDoctype() != null)
       {
-        throw new DomEx (DomEx.HIERARCHY_REQUEST_ERR,
-                         "document type already present: " +
-                         getDoctype(), newChild, 0);
+        throw new DomDOMException(DOMException.HIERARCHY_REQUEST_ERR,
+                                  "document type already present: " +
+                                  getDoctype(), newChild, 0);
       }
   }
 
@@ -376,12 +376,12 @@ public class DomDocument
   {
     if (name == null)
       {
-        throw new DomEx (DomEx.NAMESPACE_ERR, name, null, 0);
+        throw new DomDOMException(DOMException.NAMESPACE_ERR, name, null, 0);
       }
     int len = name.length();
     if (len == 0)
       {
-        throw new DomEx (DomEx.NAMESPACE_ERR, name, null, 0);
+        throw new DomDOMException(DOMException.NAMESPACE_ERR, name, null, 0);
       }
 
     // dog: rewritten to use the rules for XML 1.0 and 1.1
@@ -407,7 +407,8 @@ public class DomDocument
             (c < 0xfdf0 || c > 0xfffd) &&
             (c < 0x10000 || c > 0xeffff))
           {
-            throw new DomEx(DomEx.INVALID_CHARACTER_ERR, name, null, c);
+            throw new DomDOMException(DOMException.INVALID_CHARACTER_ERR,
+                                      name, null, c);
           }
       }
     else
@@ -425,14 +426,16 @@ public class DomDocument
                 (c >= 0x20dd && c <= 0x20e0))
               {
                 // Compatibility area and Unicode 2.0 exclusions
-                throw new DomEx(DomEx.INVALID_CHARACTER_ERR, name, null, c);
+                throw new DomDOMException(DOMException.INVALID_CHARACTER_ERR,
+                                          name, null, c);
               }
             break;
           default:
             if (c != ':' && c != '_' && (c < 0x02bb || c > 0x02c1) &&
                 c != 0x0559 && c != 0x06e5 && c != 0x06e6)
               {
-                throw new DomEx(DomEx.INVALID_CHARACTER_ERR, name, null, c);
+                throw new DomDOMException(DOMException.INVALID_CHARACTER_ERR,
+                                          name, null, c);
               }
           }
       }
@@ -464,7 +467,8 @@ public class DomDocument
                 (c < 0x0300 || c > 0x036f) &&
                 (c < 0x203f || c > 0x2040))
               {
-                throw new DomEx(DomEx.INVALID_CHARACTER_ERR, name, null, c);
+                throw new DomDOMException(DOMException.INVALID_CHARACTER_ERR, name,
+                                          null, c);
               }
           }
         else
@@ -487,7 +491,8 @@ public class DomDocument
                     (c >= 0x20dd && c <= 0x20e0))
                   {
                     // Compatibility area and Unicode 2.0 exclusions
-                    throw new DomEx(DomEx.INVALID_CHARACTER_ERR, name, null, c);
+                    throw new DomDOMException(DOMException.INVALID_CHARACTER_ERR,
+                                              name, null, c);
                   }
                 break;
               default:
@@ -495,7 +500,8 @@ public class DomDocument
                     c != 0x0387 && (c < 0x02bb || c > 0x02c1) &&
                     c != 0x0559 && c != 0x06e5 && c != 0x06e6 && c != 0x00b7)
                   {
-                    throw new DomEx(DomEx.INVALID_CHARACTER_ERR, name, null, c);
+                    throw new DomDOMException(DOMException.INVALID_CHARACTER_ERR,
+                                              name, null, c);
                   }
               }
           }
@@ -517,7 +523,8 @@ public class DomDocument
         if (index == 0 || index == (len - 1) ||
             name.lastIndexOf(':') != index)
           {
-            throw new DomEx(DomEx.NAMESPACE_ERR, name, null, 0);
+            throw new DomDOMException(DOMException.NAMESPACE_ERR,
+                                      name, null, 0);
           }
       }
   }
@@ -552,8 +559,8 @@ public class DomDocument
                 continue;
               }
           }
-        throw new DomEx(DomEx.INVALID_CHARACTER_ERR,
-                        new String(buf, off, len), null, c);
+        throw new DomDOMException(DOMException.INVALID_CHARACTER_ERR,
+                                  new String(buf, off, len), null, c);
       }
   }
 
@@ -602,22 +609,23 @@ public class DomDocument
         if (namespaceURI != null
             && !XMLConstants.XML_NS_URI.equals(namespaceURI))
           {
-            throw new DomEx(DomEx.NAMESPACE_ERR,
-                            "xml namespace is always " +
-                            XMLConstants.XML_NS_URI, this, 0);
+            throw new DomDOMException(DOMException.NAMESPACE_ERR,
+                                      "xml namespace is always " +
+                                      XMLConstants.XML_NS_URI, this, 0);
           }
         namespaceURI = XMLConstants.XML_NS_URI;
       }
     else if (XMLConstants.XMLNS_ATTRIBUTE.equals(name) ||
              name.startsWith("xmlns:"))
       {
-        throw new DomEx(DomEx.NAMESPACE_ERR,
-                        "xmlns is reserved", this, 0);
+        throw new DomDOMException(DOMException.NAMESPACE_ERR,
+                                  "xmlns is reserved", this, 0);
       }
     else if (namespaceURI == null && name.indexOf(':') != -1)
       {
-        throw new DomEx(DomEx.NAMESPACE_ERR,
-                        "prefixed name '" + name + "' needs a URI", this, 0);
+        throw new DomDOMException(DOMException.NAMESPACE_ERR,
+                                  "prefixed name '" + name +
+                                  "' needs a URI", this, 0);
       }
     
     Element  element = new DomElement(this, namespaceURI, name);
@@ -660,7 +668,7 @@ public class DomDocument
    */
   public DocumentFragment createDocumentFragment()
   {
-    return new DomFragment(this);
+    return new DomDocumentFragment(this);
   }
 
   /**
@@ -711,7 +719,7 @@ public class DomDocument
       {
         checkChar(value, "1.1".equals(version));
       }
-    return new DomCDATA(this, value);
+    return new DomCDATASection(this, value);
   }
 
   /**
@@ -723,7 +731,7 @@ public class DomDocument
       {
         checkChar(buf, off, len, "1.1".equals(version));
       }
-    return new DomCDATA(this, buf, off, len);
+    return new DomCDATASection(this, buf, off, len);
   }
 
   /**
@@ -739,12 +747,13 @@ public class DomDocument
         checkName(target, xml11);
         if ("xml".equalsIgnoreCase(target))
           {
-            throw new DomEx(DomEx.SYNTAX_ERR,
-                            "illegal PI target name", this, 0);
+            throw new DomDOMException(DOMException.SYNTAX_ERR,
+                                      "illegal PI target name",
+                                      this, 0);
           }
         checkChar(data, xml11);
       }
-    return new DomPI(this, target, data);
+    return new DomProcessingInstruction(this, target, data);
   }
 
   /**
@@ -796,9 +805,10 @@ public class DomDocument
           }
         else if (!XMLConstants.XML_NS_URI.equals(namespaceURI))
           {
-            throw new DomEx(DomEx.NAMESPACE_ERR,
-                            "xml namespace is always " +
-                            XMLConstants.XML_NS_URI, this, 0);
+            throw new DomDOMException(DOMException.NAMESPACE_ERR,
+                                      "xml namespace is always " +
+                                      XMLConstants.XML_NS_URI,
+                                      this, 0);
           }
       }
     else if (XMLConstants.XMLNS_ATTRIBUTE.equals(name) ||
@@ -810,14 +820,15 @@ public class DomDocument
           }
         else if (!XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(namespaceURI))
           {
-            throw new DomEx(DomEx.NAMESPACE_ERR,
-                            "xmlns namespace must be " +
-                            XMLConstants.XMLNS_ATTRIBUTE_NS_URI, this, 0);
+            throw new DomDOMException(DOMException.NAMESPACE_ERR,
+                                      "xmlns namespace must be " +
+                                      XMLConstants.XMLNS_ATTRIBUTE_NS_URI,
+                                      this, 0);
           }
       }
     else if (namespaceURI == null && name.indexOf(':') != -1)
       {
-        throw new DomEx(DomEx.NAMESPACE_ERR,
+        throw new DomDOMException(DOMException.NAMESPACE_ERR,
                         "prefixed name needs a URI: " + name, this, 0);
       }
     return new DomAttr(this, namespaceURI, name);
@@ -913,7 +924,7 @@ public class DomDocument
         dst = createEntityReference(src.getNodeName());
         break;
       case DOCUMENT_FRAGMENT_NODE:
-        dst = new DomFragment(this);
+        dst = new DomDocumentFragment(this);
         if (deep)
           {
             for (Node ctx = src.getFirstChild(); ctx != null;
@@ -988,7 +999,7 @@ public class DomDocument
         // FALLTHROUGH
         // can't import unrecognized or nonstandard nodes
       default:
-        throw new DomEx(DomEx.NOT_SUPPORTED_ERR, null, src, 0);
+        throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR, null, src, 0);
       }
     
     // FIXME cleanup a bit -- for deep copies, copy those
@@ -1083,7 +1094,7 @@ public class DomDocument
       }
     else
       {
-        throw new DomEx(DomEx.NOT_SUPPORTED_ERR);
+        throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR);
       }
   }
 
@@ -1149,10 +1160,10 @@ public class DomDocument
       {
       case DOCUMENT_NODE:
       case DOCUMENT_TYPE_NODE:
-        throw new DomEx(DomEx.NOT_SUPPORTED_ERR);
+        throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR);
       case ENTITY_NODE:
       case NOTATION_NODE:
-        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
       }
     if (source instanceof DomNode)
       {
@@ -1284,11 +1295,12 @@ public class DomDocument
         DomNsNode src = (DomNsNode) n;
         if (src == null)
           {
-            throw new DomEx(DomEx.NOT_FOUND_ERR);
+            throw new DomDOMException(DOMException.NOT_FOUND_ERR);
           }
         if (src.owner != this)
           {
-            throw new DomEx(DomEx.WRONG_DOCUMENT_ERR, null, src, 0);
+            throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR,
+                                      null, src, 0);
           }
         boolean xml11 = "1.1".equals(version);
         checkName(qualifiedName, xml11);
@@ -1305,7 +1317,7 @@ public class DomDocument
             if (XMLConstants.XML_NS_PREFIX.equals(prefix) &&
                 !XMLConstants.XML_NS_URI.equals(namespaceURI))
               {
-                throw new DomEx(DomEx.NAMESPACE_ERR,
+                throw new DomDOMException(DOMException.NAMESPACE_ERR,
                                 "xml namespace must be " +
                                 XMLConstants.XML_NS_URI, src, 0);
               }
@@ -1314,14 +1326,14 @@ public class DomDocument
                       XMLConstants.XMLNS_ATTRIBUTE.equals(qualifiedName)) &&
                      !XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(namespaceURI))
               {
-                throw new DomEx(DomEx.NAMESPACE_ERR,
+                throw new DomDOMException(DOMException.NAMESPACE_ERR,
                                 "xmlns namespace must be " +
                                 XMLConstants.XMLNS_ATTRIBUTE_NS_URI, src, 0);
               }
             if (XMLConstants.XML_NS_URI.equals(namespaceURI) &&
                 !XMLConstants.XML_NS_PREFIX.equals(prefix))
               {
-                throw new DomEx(DomEx.NAMESPACE_ERR,
+                throw new DomDOMException(DOMException.NAMESPACE_ERR,
                                 "xml namespace must be " +
                                 XMLConstants.XML_NS_URI, src, 0);
               }
@@ -1330,7 +1342,7 @@ public class DomDocument
                      !(XMLConstants.XMLNS_ATTRIBUTE.equals(prefix) ||
                        XMLConstants.XMLNS_ATTRIBUTE.equals(qualifiedName)))
               {
-                throw new DomEx(DomEx.NAMESPACE_ERR,
+                throw new DomDOMException(DOMException.NAMESPACE_ERR,
                                 "xmlns namespace must be " +
                                 XMLConstants.XMLNS_ATTRIBUTE_NS_URI, src, 0);
               }
@@ -1343,7 +1355,7 @@ public class DomDocument
         // DOMElementNameChanged or DOMAttributeNameChanged
         return src;
       }
-    throw new DomEx(DomEx.NOT_SUPPORTED_ERR, null, n, 0);
+    throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR, null, n, 0);
   }
 
   // -- XPathEvaluator --
index eebee09bba67ec7275762003fdf1613a41a17487..38d6e6d7bb36f39342df36f4e9bd539468e47b7d 100644 (file)
@@ -99,8 +99,8 @@ class DomDocumentConfiguration
           }
         catch (ClassCastException e)
           {
-            throw new DomEx(DomEx.TYPE_MISMATCH_ERR,
-                            value.getClass().getName(), null, 0);
+            throw new DomDOMException(DOMException.TYPE_MISMATCH_ERR,
+                                      value.getClass().getName(), null, 0);
           }
       }
     else if ("namespace-declarations".equals(name))
@@ -140,7 +140,8 @@ class DomDocumentConfiguration
       }
     else
       {
-        throw new DomEx(DomEx.NOT_SUPPORTED_ERR, name, null, 0);
+        throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR,
+                                  name, null, 0);
       }
   }
 
@@ -197,7 +198,7 @@ class DomDocumentConfiguration
             namespaceDeclarations == true &&
             comments == true) ? Boolean.TRUE : Boolean.FALSE;
       }
-    throw new DomEx(DomEx.NOT_SUPPORTED_ERR, name, null, 0);
+    throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR, name, null, 0);
   }
 
   public boolean canSetParameter(String name, Object value)
diff --git a/libjava/gnu/xml/dom/DomDocumentFragment.java b/libjava/gnu/xml/dom/DomDocumentFragment.java
new file mode 100644 (file)
index 0000000..f54b2a7
--- /dev/null
@@ -0,0 +1,76 @@
+/* DomDocumentFragment.java -- 
+   Copyright (C) 1999,2000,2001,2004 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., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 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 gnu.xml.dom;
+
+import org.w3c.dom.DocumentFragment;
+
+/**
+ * <p> "DocumentFragment" implementation.  </p>
+ *
+ * @author David Brownell 
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomDocumentFragment
+  extends DomNode
+  implements DocumentFragment
+{
+  
+  /**
+   * Constructs a DocumentFragment node associated with the
+   * specified document.
+   *
+   * <p>This constructor should only be invoked by a Document as part of
+   * its createDocumentFragment functionality, or through a subclass which
+   * is similarly used in a "Sub-DOM" style layer.
+   */
+  protected DomDocumentFragment(DomDocument owner)
+  {
+    super(DOCUMENT_FRAGMENT_NODE, owner);
+  }
+
+  /**
+   * <b>DOM L1</b>
+   * Returns the string "#document-fragment".
+   */
+  final public String getNodeName()
+  {
+    return "#document-fragment";
+  }
+  
+}
+
index fb04638af129e9b48debeefd758bc7fd6d025395..535608343f9efba63a7828da3629ed4a475dfa16 100644 (file)
@@ -42,6 +42,7 @@ import java.util.Set;
 import javax.xml.XMLConstants;
 
 import org.w3c.dom.Attr;
+import org.w3c.dom.DOMException;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
@@ -262,7 +263,7 @@ public class DomElement
     if (("xmlns".equals (aname) || aname.startsWith ("xmlns:"))
         && !XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals (uri))
       {
-        throw new DomEx(DomEx.NAMESPACE_ERR,
+        throw new DomDOMException(DOMException.NAMESPACE_ERR,
                         "setting xmlns attribute to illegal value", this, 0);
       }
 
@@ -318,9 +319,9 @@ public class DomElement
       {
         attributes.removeNamedItem(name);
       }
-    catch (DomEx e)
+    catch (DomDOMException e)
       {
-        if (e.code != DomEx.NOT_FOUND_ERR)
+        if (e.code != DOMException.NOT_FOUND_ERR)
           {
             throw e;
           }
@@ -340,7 +341,7 @@ public class DomElement
   {
     if (attributes == null)
       {
-        throw new DomEx(DomEx.NOT_FOUND_ERR, null, node, 0);
+        throw new DomDOMException(DOMException.NOT_FOUND_ERR, null, node, 0);
       }
     return (Attr) attributes.removeNamedItem(node.getNodeName());
   }
@@ -358,7 +359,7 @@ public class DomElement
   {
     if (attributes == null)
       {
-        throw new DomEx(DomEx.NOT_FOUND_ERR, localPart, null, 0);
+        throw new DomDOMException(DOMException.NOT_FOUND_ERR, localPart, null, 0);
       }
     attributes.removeNamedItemNS (namespace, localPart);
   }
@@ -487,11 +488,11 @@ public class DomElement
   {
     if (readonly)
       {
-        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
       }
     if (attr == null || attr.getOwnerElement() != this)
       {
-        throw new DomEx(DomEx.NOT_FOUND_ERR);
+        throw new DomDOMException(DOMException.NOT_FOUND_ERR);
       }
     if (isId)
       {
diff --git a/libjava/gnu/xml/dom/DomEx.java b/libjava/gnu/xml/dom/DomEx.java
deleted file mode 100644 (file)
index aacac96..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-/* DomEx.java -- 
-   Copyright (C) 1999,2000,2001,2004 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., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 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 gnu.xml.dom;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Node;
-
-/**
- * <p> DOMException implementation.   The version that
- * is provided by the W3C is abstract, so it can't be instantiated.
- *
- * <p> This also provides a bit more information about the error
- * that is being reported, in terms of the relevant DOM structures
- * and data.
- *
- * @author David Brownell 
- */
-public class DomEx
-  extends DOMException
-{
-
-  /** @serial Data that caused an error to be reported */
-  private String data;
-  
-  /** @serial Node associated with the error. */
-  private Node node;
-  
-  /** @serial Data associated with the error. */
-  private int value;
-  
-  /**
-   * Constructs an exception, with the diagnostic message
-   * corresponding to the specified code.
-   */
-  public DomEx(short code)
-  {
-    super(code, diagnostic(code));
-  }
-  
-  /**
-   * Constructs an exception, with the diagnostic message
-   * corresponding to the specified code and additional
-   * information as provided.
-   */
-  public DomEx(short code, String data, Node node, int value)
-  {
-    super(code, diagnostic(code));
-    this.data = data;
-    this.node = node;
-    this.value = value;
-  }
-
-  /** Returns the node to which the diagnotic applies, or null. */
-  final public Node getNode()
-  {
-    return node;
-  }
-
-  /** Returns data to which the diagnotic applies, or null. */
-  final public String getData()
-  {
-    return data;
-  }
-
-  /** Returns data to which the diagnotic applies, or null. */
-  final public int getValue()
-  {
-    return value;
-  }
-
-  /**
-   * Returns a diagnostic message that may be slightly more useful
-   * than the generic one, where possible.
-   */
-  public String getMessage()
-  {
-    String retval = super.getMessage();
-    
-    if (data != null)
-      {
-        retval += "\nMore Information: " + data;
-      }
-    if (value != 0)
-      {
-        retval += "\nNumber: " + value;
-      }
-    if (node != null)
-      {
-        retval += "\nNode Name: " + node.getNodeName();
-      }
-    return retval;
-  }
-
-  // these strings should be localizable.
-  
-  private static String diagnostic(short code)
-  {
-    switch (code)
-      {        
-        // DOM L1:
-      case INDEX_SIZE_ERR:
-        return "An index or size is out of range.";
-      case DOMSTRING_SIZE_ERR:
-        return "A string is too big.";
-      case HIERARCHY_REQUEST_ERR:
-        return "The node doesn't belong here.";
-      case WRONG_DOCUMENT_ERR:
-        return "The node belongs in another document.";
-      case INVALID_CHARACTER_ERR:
-        return "That character is not permitted.";
-      case NO_DATA_ALLOWED_ERR:
-        return "This node does not permit data.";
-      case NO_MODIFICATION_ALLOWED_ERR:
-        return "No changes are allowed.";
-      case NOT_FOUND_ERR:
-        return "The node was not found in that context.";
-      case NOT_SUPPORTED_ERR:
-        return "That object is not supported.";
-      case INUSE_ATTRIBUTE_ERR:
-        return "The attribute belongs to a different element.";
-        
-        // DOM L2:
-      case INVALID_STATE_ERR:
-        return "The object is not usable.";
-      case SYNTAX_ERR:
-        return "An illegal string was provided.";
-      case INVALID_MODIFICATION_ERR:
-        return "An object's type may not be changed.";
-      case NAMESPACE_ERR:
-        return "The operation violates XML Namespaces.";
-      case INVALID_ACCESS_ERR:
-        return "Parameter or operation isn't supported by this node.";
-      case TYPE_MISMATCH_ERR:
-        return "The type of the argument is incompatible with the expected type.";
-      }
-    return "Reserved exception number: " + code;
-  }
-
-}
-
diff --git a/libjava/gnu/xml/dom/DomFragment.java b/libjava/gnu/xml/dom/DomFragment.java
deleted file mode 100644 (file)
index 44763a9..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/* DomFragment.java -- 
-   Copyright (C) 1999,2000,2001,2004 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., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 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 gnu.xml.dom;
-
-import org.w3c.dom.DocumentFragment;
-
-/**
- * <p> "DocumentFragment" implementation.  </p>
- *
- * @author David Brownell 
- * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
- */
-public class DomFragment
-  extends DomNode
-  implements DocumentFragment
-{
-  
-  /**
-   * Constructs a DocumentFragment node associated with the
-   * specified document.
-   *
-   * <p>This constructor should only be invoked by a Document as part of
-   * its createDocumentFragment functionality, or through a subclass which
-   * is similarly used in a "Sub-DOM" style layer.
-   */
-  protected DomFragment(DomDocument owner)
-  {
-    super(DOCUMENT_FRAGMENT_NODE, owner);
-  }
-
-  /**
-   * <b>DOM L1</b>
-   * Returns the string "#document-fragment".
-   */
-  final public String getNodeName()
-  {
-    return "#document-fragment";
-  }
-  
-}
-
index 1a16de325937f79bf68b125198ad10656c0c738f..feb7ea703cc297051c53975cc4e653ae75e2c018 100644 (file)
@@ -207,7 +207,8 @@ public class DomImpl
         root = doc.createElementNS(namespaceURI, rootName);
         if (rootName.startsWith("xmlns:"))
           {
-            throw new DomEx(DomEx.NAMESPACE_ERR, "xmlns is reserved", null, 0);
+            throw new DomDOMException(DOMException.NAMESPACE_ERR,
+                                      "xmlns is reserved", null, 0);
           }
       }
     // Bleech -- L2 seemingly _requires_ omission of xmlns attributes.
index 3dfd96403345da23564a5736c3da3cda2d8eba38..fb05d93084c6a77549d2d58299b34f56de4019f0 100644 (file)
@@ -39,6 +39,7 @@ package gnu.xml.dom;
 
 import java.util.Vector;
 
+import org.w3c.dom.DOMException;
 import org.w3c.dom.Node;
 import org.w3c.dom.events.Event;
 import org.w3c.dom.events.EventListener;
@@ -76,7 +77,7 @@ public final class DomIterator
   {
     if (!root.isSupported("MutationEvents", "2.0")) 
       {
-        throw new DomEx(DomEx.NOT_SUPPORTED_ERR,
+        throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR,
                         "Iterator needs mutation events", root, 0);
       }
        
@@ -154,7 +155,7 @@ public final class DomIterator
   {
     if (done)
       {
-        throw new DomEx(DomEx.INVALID_STATE_ERR);
+        throw new DomDOMException(DOMException.INVALID_STATE_ERR);
       }
     right = true;
     return walk(true);
@@ -171,7 +172,7 @@ public final class DomIterator
   {
     if (done)
       {
-        throw new DomEx(DomEx.INVALID_STATE_ERR);
+        throw new DomDOMException(DOMException.INVALID_STATE_ERR);
       }
     Node previous = reference;
     right = false;
index af7594249be3fca82da6868a3eecf6caa4c40c9f..2b1106e64c00d6222c6712e22eff4c7569dad880 100644 (file)
@@ -37,6 +37,7 @@ exception statement from your version. */
 
 package gnu.xml.dom;
 
+import org.w3c.dom.DOMException;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -166,24 +167,24 @@ public class DomNamedNodeMap
   {
     if (readonly)
       {
-        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
       }
 
     DomNode node = (DomNode) arg;
     if (node.owner != owner.owner)
       {
-        throw new DomEx(DomEx.WRONG_DOCUMENT_ERR);
+        throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR);
       }
     if (node.nodeType != type)
       {
-        throw new DomEx(DomEx.HIERARCHY_REQUEST_ERR);
+        throw new DomDOMException(DOMException.HIERARCHY_REQUEST_ERR);
       }
     if (node.nodeType == Node.ATTRIBUTE_NODE)
       {
         DomNode element = node.parent;
         if (element != null && element != owner)
           {
-            throw new DomEx(DomEx.INUSE_ATTRIBUTE_ERR);
+            throw new DomDOMException(DOMException.INUSE_ATTRIBUTE_ERR);
           }
         node.parent = owner;
         node.depth = owner.depth + 1;
@@ -302,7 +303,7 @@ public class DomNamedNodeMap
   {
     if (readonly)
       {
-        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
       }
 
     // report attribute REMOVAL event?
@@ -369,7 +370,7 @@ public class DomNamedNodeMap
             return ctx;
           }
       }    
-    throw new DomEx(DomEx.NOT_FOUND_ERR);
+    throw new DomDOMException(DOMException.NOT_FOUND_ERR);
   }
   
   String getDefaultValue(String name)
index 3858fe8bbb968f472d09e013758fce43635e59f2..74535eef65676a82e82729c55536eec6f6701562 100644 (file)
@@ -308,15 +308,16 @@ public abstract class DomNode
   {
     if (readonly && !owner.building)
       {
-        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR,
-                        null, this, 0);
+        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
+                                  null, this, 0);
       }
     for (DomNode ctx = this; ctx != null; ctx = ctx.parent)
       {
         if (child == ctx)
           {
-            throw new DomEx(DomEx.HIERARCHY_REQUEST_ERR,
-                            "can't make ancestor into a child", this, 0);
+            throw new DomDOMException(DOMException.HIERARCHY_REQUEST_ERR,
+                                      "can't make ancestor into a child",
+                                      this, 0);
           }
       }
 
@@ -330,8 +331,8 @@ public abstract class DomNode
         // new in DOM L2, this case -- patch it up later, in reparent()
         if (!(childNodeType == DOCUMENT_TYPE_NODE && childOwner == null))
           {
-            throw new DomEx(DomEx.WRONG_DOCUMENT_ERR,
-                            null, child, 0);
+            throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR,
+                                      null, child, 0);
           }
       }
 
@@ -376,10 +377,12 @@ public abstract class DomNode
       }
     if (owner.checkingWellformedness)
       {
-        throw new DomEx(DomEx.HIERARCHY_REQUEST_ERR,
-                        "can't append " + nodeTypeToString(childNodeType) +
-                        " to node of type " + nodeTypeToString(nodeType),
-                        this, 0);
+        throw new DomDOMException(DOMException.HIERARCHY_REQUEST_ERR,
+                                  "can't append " +
+                                  nodeTypeToString(childNodeType) +
+                                  " to node of type " +
+                                  nodeTypeToString(nodeType),
+                                  this, 0);
       }
   }
   
@@ -578,8 +581,8 @@ public abstract class DomNode
       }
     catch (ClassCastException e)
       {
-        throw new DomEx(DomEx.WRONG_DOCUMENT_ERR,
-                        null, newChild, 0);
+        throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR,
+                                  null, newChild, 0);
     }
   }
 
@@ -630,12 +633,14 @@ public abstract class DomNode
             checkMisc(child);
             if (ref == null || ref.parent != this)
               {
-                throw new DomEx(DomEx.NOT_FOUND_ERR, null, ref, 0);
+                throw new DomDOMException(DOMException.NOT_FOUND_ERR,
+                                          null, ref, 0);
               }
             if (ref == child)
               {
-                throw new DomEx(DomEx.HIERARCHY_REQUEST_ERR,
-                                "can't insert node before itself", ref, 0);
+                throw new DomDOMException(DOMException.HIERARCHY_REQUEST_ERR,
+                                          "can't insert node before itself",
+                                          ref, 0);
               }
         
             if (child.parent != null)
@@ -672,8 +677,8 @@ public abstract class DomNode
       }
     catch (ClassCastException e)
       {
-        throw new DomEx(DomEx.WRONG_DOCUMENT_ERR,
-                        null, newChild, 0);
+        throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR,
+                                  null, newChild, 0);
       }
   }
 
@@ -721,7 +726,8 @@ public abstract class DomNode
               }
             if (ref == null || ref.parent != this)
               {
-                throw new DomEx(DomEx.NOT_FOUND_ERR, null, ref, 0);
+                throw new DomDOMException(DOMException.NOT_FOUND_ERR,
+                                          null, ref, 0);
               }
             
             if (reportMutations)
@@ -784,7 +790,8 @@ public abstract class DomNode
             checkMisc(child);
             if (ref == null || ref.parent != this)
               {
-                throw new DomEx(DomEx.NOT_FOUND_ERR, null, ref, 0);
+                throw new DomDOMException(DOMException.NOT_FOUND_ERR,
+                                          null, ref, 0);
               }
         
             if (reportMutations)
@@ -837,8 +844,8 @@ public abstract class DomNode
       }
     catch (ClassCastException e)
       {
-        throw new DomEx(DomEx.WRONG_DOCUMENT_ERR,
-                        null, newChild, 0);
+        throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR,
+                                  null, newChild, 0);
       }
   }
 
@@ -860,12 +867,13 @@ public abstract class DomNode
 
         if (ref == null || ref.parent != this)
           {
-            throw new DomEx(DomEx.NOT_FOUND_ERR, null, ref, 0);
+            throw new DomDOMException(DOMException.NOT_FOUND_ERR,
+                                      null, ref, 0);
           }
         if (readonly && !owner.building)
           {
-            throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR,
-                            null, this, 0);
+            throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
+                                      null, this, 0);
           }
         
         for (DomNode child = first; child != null; child = child.next)
@@ -909,13 +917,13 @@ public abstract class DomNode
                 return ref;
               }
           }
-        throw new DomEx(DomEx.NOT_FOUND_ERR,
-                        "that's no child of mine", refChild, 0);
+        throw new DomDOMException(DOMException.NOT_FOUND_ERR,
+                                  "that's no child of mine", refChild, 0);
       }
     catch (ClassCastException e)
       {
-        throw new DomEx(DomEx.WRONG_DOCUMENT_ERR,
-                        null, refChild, 0);
+        throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR,
+                                  null, refChild, 0);
       }
   }
 
@@ -1446,8 +1454,8 @@ public abstract class DomNode
 
     // mouse events 
     
-    throw new DomEx(DomEx.NOT_SUPPORTED_ERR,
-                    eventType, null, 0);
+    throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR,
+                              eventType, null, 0);
   }
 
   /**
index ea41fff6b8cdeb556772cf0fa84b19318f4a952c..15b2fb542286447f3d377347ae8bf930a77cfb4b 100644 (file)
@@ -38,6 +38,7 @@ exception statement from your version. */
 package gnu.xml.dom;
 
 import javax.xml.XMLConstants;
+import org.w3c.dom.DOMException;
 
 /**
  * <p> Abstract implemention of namespace support.  This facilitates
@@ -135,7 +136,7 @@ public abstract class DomNsNode
   {
     if (readonly)
       {
-        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
       }
 
     if (prefix == null)
@@ -145,40 +146,42 @@ public abstract class DomNsNode
       }
     else if (namespace == null)
       {
-        throw new DomEx(DomEx.NAMESPACE_ERR,
-                        "can't set prefix, node has no namespace URI",
-                        this, 0);
+        throw new DomDOMException(DOMException.NAMESPACE_ERR,
+                                  "can't set prefix, node has no namespace URI",
+                                  this, 0);
       }
 
     DomDocument.checkName(prefix, "1.1".equals(owner.getXmlVersion()));
     if (prefix.indexOf (':') != -1)
       {
-        throw new DomEx(DomEx.NAMESPACE_ERR,
-                        "illegal prefix " + prefix, this, 0);
+        throw new DomDOMException(DOMException.NAMESPACE_ERR,
+                                  "illegal prefix " + prefix, this, 0);
       }
 
     if (XMLConstants.XML_NS_PREFIX.equals(prefix)
         && !XMLConstants.XML_NS_URI.equals(namespace))
       {
-        throw new DomEx(DomEx.NAMESPACE_ERR,
-                        "xml namespace is always " +
-                        XMLConstants.XML_NS_URI, this, 0);
+        throw new DomDOMException(DOMException.NAMESPACE_ERR,
+                                  "xml namespace is always " +
+                                  XMLConstants.XML_NS_URI, this, 0);
       }
 
     if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix))
       {
         if (namespace != null || getNodeType() != ATTRIBUTE_NODE)
           {
-            throw new DomEx(DomEx.NAMESPACE_ERR,
-                            "xmlns attribute prefix is reserved", this, 0);
+            throw new DomDOMException(DOMException.NAMESPACE_ERR,
+                                      "xmlns attribute prefix is reserved",
+                                      this, 0);
           }
       }
     else if (getNodeType () == ATTRIBUTE_NODE
              && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) ||
                  name.startsWith("xmlns:")))
       {
-        throw new DomEx(DomEx.NAMESPACE_ERR,
-                        "namespace declarations can't change names", this, 0);
+        throw new DomDOMException(DOMException.NAMESPACE_ERR,
+                                  "namespace declarations can't change names",
+                                  this, 0);
       }
 
     this.prefix = prefix.intern();
diff --git a/libjava/gnu/xml/dom/DomPI.java b/libjava/gnu/xml/dom/DomPI.java
deleted file mode 100644 (file)
index dedf375..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/* DomPI.java -- 
-   Copyright (C) 1999,2000,2001,2004 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., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 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 gnu.xml.dom;
-
-import org.w3c.dom.ProcessingInstruction;
-
-/**
- * <p> "ProcessingInstruction" (PI) implementation.
- * This is a non-core DOM class, supporting the "XML" feature. </p>
- *
- * <p> Unlike other DOM APIs in the "XML" feature, this one fully
- * exposes the functionality it describes.  So there is no reason
- * inherent in DOM to avoid using this API, unless you want to rely
- * on NOTATION declarations to associate meaning with your PIs;
- * there is no vendor-neutal way to record those notations in DOM.</p>
- *
- * <p> Also of note is that PI support is part of SAX, so that XML
- * systems using PIs can choose among multiple APIs. </p>
- *
- * @see DomNotation
- *
- * @author David Brownell 
- * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
- */
-public class DomPI
-  extends DomNode
-  implements ProcessingInstruction
-{
-  
-  private String target;
-  private String data;
-  
-  /**
-   * Constructs a ProcessingInstruction node associated with the
-   * specified document, with the specified data.
-   *
-   * <p>This constructor should only be invoked by a Document object as
-   * part of its createProcessingInstruction functionality, or through
-   * a subclass which is similarly used in a "Sub-DOM" style layer. 
-   */
-  protected DomPI(DomDocument owner, String target, String data)
-  {
-    super(PROCESSING_INSTRUCTION_NODE, owner);
-    this.target = target;
-    this.data = data;
-  }
-
-  /**
-   * <b>DOM L1</b>
-   * Returns the target of the processing instruction.
-   */
-  public final String getTarget()
-  {
-    return target;
-  }
-
-  /**
-   * <b>DOM L1</b>
-   * Returns the target of the processing instruction
-   * (same as getTarget).
-   */
-  public final String getNodeName()
-  {
-    return target;
-  }
-
-  /**
-   * <b>DOM L1</b>
-   * Returns the data associated with the processing instruction.
-   */
-  public final String getData()
-  {
-    return data;
-  }
-
-  /**
-   * <b>DOM L1</b>
-   * Returns the data associated with the processing instruction
-   * (same as getData).
-   */
-  public final String getNodeValue()
-  {
-    return data;
-  }
-
-  /**
-   * <b>DOM L1</b>
-   * Assigns the data associated with the processing instruction;
-   * same as setNodeValue.
-   */
-  public final void setData(String data)
-  {
-    setNodeValue(data);
-  }
-  
-  /**
-   * <b>DOM L1</b>
-   * Assigns the data associated with the processing instruction.
-   */
-  public final void setNodeValue(String data)
-  {
-    if (isReadonly())
-      {
-        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
-      }
-    this.data = data;
-  }
-  
-}
-
diff --git a/libjava/gnu/xml/dom/DomProcessingInstruction.java b/libjava/gnu/xml/dom/DomProcessingInstruction.java
new file mode 100644 (file)
index 0000000..9697f33
--- /dev/null
@@ -0,0 +1,147 @@
+/* DomProcessingInstruction.java -- 
+   Copyright (C) 1999,2000,2001,2004 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., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 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 gnu.xml.dom;
+
+import org.w3c.dom.DOMException;
+import org.w3c.dom.ProcessingInstruction;
+
+/**
+ * <p> "ProcessingInstruction" (PI) implementation.
+ * This is a non-core DOM class, supporting the "XML" feature. </p>
+ *
+ * <p> Unlike other DOM APIs in the "XML" feature, this one fully
+ * exposes the functionality it describes.  So there is no reason
+ * inherent in DOM to avoid using this API, unless you want to rely
+ * on NOTATION declarations to associate meaning with your PIs;
+ * there is no vendor-neutal way to record those notations in DOM.</p>
+ *
+ * <p> Also of note is that PI support is part of SAX, so that XML
+ * systems using PIs can choose among multiple APIs. </p>
+ *
+ * @see DomNotation
+ *
+ * @author David Brownell 
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomProcessingInstruction
+  extends DomNode
+  implements ProcessingInstruction
+{
+  
+  private String target;
+  private String data;
+  
+  /**
+   * Constructs a ProcessingInstruction node associated with the
+   * specified document, with the specified data.
+   *
+   * <p>This constructor should only be invoked by a Document object as
+   * part of its createProcessingInstruction functionality, or through
+   * a subclass which is similarly used in a "Sub-DOM" style layer. 
+   */
+  protected DomProcessingInstruction(DomDocument owner,
+                                     String target, String data)
+  {
+    super(PROCESSING_INSTRUCTION_NODE, owner);
+    this.target = target;
+    this.data = data;
+  }
+
+  /**
+   * <b>DOM L1</b>
+   * Returns the target of the processing instruction.
+   */
+  public final String getTarget()
+  {
+    return target;
+  }
+
+  /**
+   * <b>DOM L1</b>
+   * Returns the target of the processing instruction
+   * (same as getTarget).
+   */
+  public final String getNodeName()
+  {
+    return target;
+  }
+
+  /**
+   * <b>DOM L1</b>
+   * Returns the data associated with the processing instruction.
+   */
+  public final String getData()
+  {
+    return data;
+  }
+
+  /**
+   * <b>DOM L1</b>
+   * Returns the data associated with the processing instruction
+   * (same as getData).
+   */
+  public final String getNodeValue()
+  {
+    return data;
+  }
+
+  /**
+   * <b>DOM L1</b>
+   * Assigns the data associated with the processing instruction;
+   * same as setNodeValue.
+   */
+  public final void setData(String data)
+  {
+    setNodeValue(data);
+  }
+  
+  /**
+   * <b>DOM L1</b>
+   * Assigns the data associated with the processing instruction.
+   */
+  public final void setNodeValue(String data)
+  {
+    if (isReadonly())
+      {
+        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
+      }
+    this.data = data;
+  }
+  
+}
+
index d714655e61db4431f58e6058a351155bb73df808..dc2d50a8eb74a3309414ea1053fca75304046a4d 100644 (file)
@@ -102,7 +102,7 @@ public class DomText
   {
     if (isReadonly())
       {
-        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
       }
     try
       {
@@ -134,7 +134,7 @@ public class DomText
       }
     catch (IndexOutOfBoundsException x)
       {
-        throw new DomEx(DomEx.INDEX_SIZE_ERR);
+        throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
       }
   }
     
diff --git a/libjava/gnu/xml/dom/ls/DomLSEx.java b/libjava/gnu/xml/dom/ls/DomLSEx.java
deleted file mode 100644 (file)
index 5bf1595..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/* DomLSEx.java -- 
-   Copyright (C) 2004 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., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 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 gnu.xml.dom.ls;
-
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import org.w3c.dom.ls.LSException;
-
-/**
- * A DOM LS exception incorporating a cause.
- *
- * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
- */
-public class DomLSEx
-  extends LSException
-{
-
-  private final Exception cause2;
-
-  public DomLSEx(short type, Exception cause)
-  {
-    super(type, cause.getMessage());
-    cause2 = cause;
-  }
-
-  public void printStackTrace(PrintStream out)
-  {
-    super.printStackTrace(out);
-    out.print("caused by ");
-    cause2.printStackTrace(out);
-  }
-  
-  public void printStackTrace(PrintWriter out)
-  {
-    super.printStackTrace(out);
-    out.print("caused by ");
-    cause2.printStackTrace(out);
-  }
-  
-}
diff --git a/libjava/gnu/xml/dom/ls/DomLSException.java b/libjava/gnu/xml/dom/ls/DomLSException.java
new file mode 100644 (file)
index 0000000..6701b3e
--- /dev/null
@@ -0,0 +1,57 @@
+/* DomLSException.java -- 
+   Copyright (C) 2004 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., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 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 gnu.xml.dom.ls;
+
+import org.w3c.dom.ls.LSException;
+
+/**
+ * A DOM LS exception incorporating a cause.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomLSException
+  extends LSException
+{
+
+  public DomLSException(short type, Exception cause)
+  {
+    super(type, (cause == null) ? null : cause.getMessage());
+    initCause(cause);
+  }
+
+}
index b050b99a1a2a67f758f4c2c40e01b84c0030ecba..489777fc913d75da82b458d75b381bd7aeb7496d 100644 (file)
@@ -65,7 +65,7 @@ import org.xml.sax.SAXNotRecognizedException;
 import org.xml.sax.SAXParseException;
 import org.xml.sax.XMLReader;
 import gnu.xml.dom.DomDocument;
-import gnu.xml.dom.DomEx;
+import gnu.xml.dom.DomDOMException;
 
 /**
  * Parser implementation for GNU DOM.
@@ -117,7 +117,7 @@ public class DomLSParser
         async = false;
         break;
       default:
-        throw new DomEx(DOMException.NOT_SUPPORTED_ERR);
+        throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR);
       }
     // TODO schemaType
     this.schemaType = schemaType;
@@ -307,13 +307,13 @@ public class DomLSParser
       {
         reader = null;
         eventSink = null;
-        throw new DomLSEx(LSException.PARSE_ERR, e);
+        throw new DomLSException(LSException.PARSE_ERR, e);
       }
     catch (IOException e)
       {
         reader = null;
         eventSink = null;
-        throw new DomLSEx(LSException.PARSE_ERR, e);
+        throw new DomLSException(LSException.PARSE_ERR, e);
       }
     // return document
     Document ret = eventSink.doc;
@@ -341,11 +341,11 @@ public class DomLSParser
           }
         catch (ParserConfigurationException e)
           {
-            throw new DomLSEx(LSException.PARSE_ERR, e);
+            throw new DomLSException(LSException.PARSE_ERR, e);
           }
         catch (SAXException e)
           {
-            throw new DomLSEx(LSException.PARSE_ERR, e);
+            throw new DomLSException(LSException.PARSE_ERR, e);
           }
       }
     return reader;
@@ -371,11 +371,11 @@ public class DomLSParser
           }
         catch (SAXException e)
           {
-            throw new DomLSEx(LSException.PARSE_ERR, e);
+            throw new DomLSException(LSException.PARSE_ERR, e);
           } 
         catch (IOException e)
           {
-            throw new DomLSEx(LSException.PARSE_ERR, e);
+            throw new DomLSException(LSException.PARSE_ERR, e);
           } 
       }
     if (source == null)
@@ -403,7 +403,7 @@ public class DomLSParser
           }
         catch (IOException e)
           {
-            throw new DomLSEx(LSException.PARSE_ERR, e);
+            throw new DomLSException(LSException.PARSE_ERR, e);
           }
       }
     return source;
@@ -457,7 +457,7 @@ public class DomLSParser
       }
     else
       {
-        throw new DomEx(DomEx.NOT_SUPPORTED_ERR);
+        throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR);
       }
     // invalidate reader, a new one will be created
     reader = null;
@@ -509,7 +509,7 @@ public class DomLSParser
       }
     else
       {
-        throw new DomEx(DomEx.NOT_SUPPORTED_ERR);
+        throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR);
       }
   }
 
index 91a01c96e0e55d31d5e3db6440173b1566efa2fe..ec27c5de65bba18ffb8d5184ac5db396c795860c 100644 (file)
@@ -58,7 +58,7 @@ import org.w3c.dom.ls.LSOutput;
 import org.w3c.dom.ls.LSSerializer;
 import org.w3c.dom.ls.LSSerializerFilter;
 import org.w3c.dom.traversal.NodeFilter;
-import gnu.xml.dom.DomEx;
+import gnu.xml.dom.DomDOMException;
 import gnu.xml.transform.StreamSerializer;
 
 /**
@@ -147,7 +147,7 @@ public class DomLSSerializer
       }
     catch (IOException e)
       {
-        throw new DomLSEx(LSException.SERIALIZE_ERR, e);
+        throw new DomLSException(LSException.SERIALIZE_ERR, e);
       }
   }
 
@@ -302,7 +302,7 @@ public class DomLSSerializer
       }
     else
       {
-        throw new DomEx(DomEx.NOT_SUPPORTED_ERR);
+        throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR);
       }
   }
 
@@ -319,7 +319,7 @@ public class DomLSSerializer
       }
     else
       {
-        throw new DomEx(DomEx.NOT_SUPPORTED_ERR);
+        throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR);
       }
   }
 
index 3b199f6dc0d2c019ee737ec517b93ad520474c48..ef03d42fc386e123f68f0326433f5eb4aeb04f6a 100644 (file)
@@ -635,7 +635,8 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
           // preserve original namespace prefixes
           try
             {
-              producer.setFeature(handler.FEATURE_URI + "namespace-prefixes",
+              producer.setFeature(EventFilter.FEATURE_URI +
+                                  "namespace-prefixes",
                                   true);
             }
           catch (Exception e)
@@ -646,7 +647,7 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
           
           // arrange the output
           handler.setResult (out);
-          handler.bind (producer, handler);
+          EventFilter.bind (producer, handler);
           
           // then parse ... single element pipeline
           producer.parse (input);
index 81e1755fbda0711a10286a70fa07a98bd791f876..a857c16bbf159bf87fa1026c0d34cf5341302171 100644 (file)
@@ -63,7 +63,7 @@ class Predicate
         // Same as [position() = x]
         return ((Double) ret).intValue() == pos;
       }
-    return expr._boolean(node, expr.evaluate(node, pos, len));
+    return Expr._boolean(node, expr.evaluate(node, pos, len));
   }
 
   public Test clone(Object context)