logo       

Default maximum number of attributes 1!?!?: msg#00015

text.xml.xerces-j.devel

Subject: 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@xxxxxxxxxxxxxx/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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise