users@jaxb.java.net

Re: Problems with running XJC for JAXB 1.0.2

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 27 Oct 2003 16:43:40 -0800

I confirmed that this is a bug in Crimson. I recommend you to use Xerces
instead.

If you need to use Crimson, modify org.apache.crimson.tree.ElementNode2
as follows:

    public void removeAttributeNS(String namespaceURI, String localName)
        throws DOMException
    {
        if (readonly) {
            throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
        }
        ////// bug fix from here
        if( attributes==null ) return;
        ////// bug fix until here
        try {
            attributes.removeNamedItemNS(namespaceURI, localName);
        } catch (DOMException x) {
            // DOM2 does not allow a NOT_FOUND_ERR exception to be thrown
            if (x.code != DOMException.NOT_FOUND_ERR) {
                throw x;
            }
        }
    }


See
http://cvs.apache.org/viewcvs.cgi/xml-crimson/src/org/apache/crimson/tree/ElementNode2.java?rev=1.11&content-type=text/vnd.viewcvs-markup

regards,
--
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net