scarso luigi wrote:
> Do i make some mistakes ?
Yes. Here's the problem:
QName title = new QName(null,"title","title",null);
QName para1 = new QName(null,"para","para",null);
QName para2 = new QName(null,"para","para",null);
As Sandy mentioned, in order for the reference comparisons
to work, the strings for the names MUST be added through
the parser's SymbolTable. Luckily for users of the parser,
though, the SymbolTable class calls the String#intern
method to internalize the string objects.
So change the above lines of code to use interned versions
of the String objects. For example:
String TITLE = "title".intern();
String PARA = "para".intern();
QName title = new QName(null, TITLE, TITLE, null);
QName para1 = new QName(null, PARA, PARA, null);
QName para2 = new QName(null, PARA, PARA, null);
Make sure that all of the element names in your code
are interned before passing them to the Xerces validator.
How does that work for you?
--
Andy Clark * [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]