You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Norman Walsh <nd...@nwalsh.com> on 2001/09/27 22:32:51 UTC

Bogus duplicate attribute bug

After I upgraded to the latest CVS version of XalanJ yesterday or the
day before, I've had the following very strange problem. I'm finding
it very difficult to track down, so I'm posting this partial
description in the hopes that someone else will be able to provide
better intuition.

The bug manifests itself in the following error message:

  [Fatal Error] :-1:-1: Attribute "rewritePrefix" bound to namespace ""
  was already specified for element "rewriteURI".

The lack of line numbers may not be significant, I think they used to
be there before I did a little shotgun debugging in frustration.

The document is perfectly valid and does not have duplicate attributes.

Fairly deep in my code, I find:

      if (parserFactory != null) {
	SAXParser parser = parserFactory.newSAXParser();

	System.out.println("FIXME: parser=" + parser);

// This prints:
// FIXME: parser=org.apache.xerces.jaxp.SAXParserImpl@dae121a4

	XMLReader reader = parser.getXMLReader();
	reader.setContentHandler(new TestFilter());
	reader.parse(new InputSource(is));

// Things go bang here.

Now, the really odd thing (IMHO) is that if I do not set a content
handler, the problem does not appear. And the TestFilter() content
handler is just a wrapper around XMLFilterImpl. It started with a
single method that printed the start tag (this error occurs on the
second element in the document), but I even tried renaming that to
something not in the SAX API. It still goes bang.

Hints or suggestions most appreciated.

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@Sun.COM   | The truest wild beasts live in the most
XML Standards Engineer | populous places.--Graci\'an
XML Technology Center  | 
Sun Microsystems, Inc. | 

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


Re: Bogus duplicate attribute bug

Posted by Norman Walsh <nd...@nwalsh.com>.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org