You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Elliotte Harold <el...@metalab.unc.edu> on 2004/08/16 20:43:07 UTC

Default maximum number of attributes 1!?!?

While playing with Java 1.5, a basic program that works with Java 1.4 
and with most versions of Xerces tossed the following weird error message:

Element "html" has more than "1" attributes, "1" is the limit imposed by 
the application.

and then gave up the ghost. This is using the repackaged Xerces internal 
to Java 1.5. The same program works with standard Xerces. Nonetheless, I 
thought this mailing list was a little more likely to shed some light on 
the problem.

Googling around revealed this:

http://www.mail-archive.com/xerces-cvs@xml.apache.org/msg03242.html

which suggests that Xerces is imposing some internal limit on the 
maximum number of attributes per element; and in this case that maximum 
number is somehow being set to 1.

The class doing the parsing is not quite standard Xerces. Instead it 
looks like this:

package nu.xom;

import com.sun.org.apache.xerces.internal.parsers.SAXParser;
import com.sun.org.apache.xerces.internal.parsers.DTDConfiguration;

public class JDK15XML1_0Parser extends SAXParser {

    public JDK15XML1_0Parser() {
        super(new DTDConfiguration());
    }

}

Is there something else I need to be doing in the latest Xerces to make 
it allow more than one attribute per element? An additional 
configuration? A system property somewhere, maybe? Amy suggestions?

--
Elliotte Rusty Harold

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org