[multiple changes]

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
This commit is contained in:
Mark Wielaard 2005-02-16 19:25:06 +00:00
parent 3bd09563e1
commit 7526f35528
25 changed files with 400 additions and 302 deletions

View 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);
}
/**