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 Nikhil Dinesh <ni...@seas.upenn.edu> on 2004/07/19 22:22:01 UTC

Xerces validation and symbol table features

Hi,

Im using Xerces to construct a large schema instance in memory and I was
wondering if there is any way to do the following:

a. For getElementById to work I need to call psviDoc.normalizeDocument(),
right?  The problem here is that the schemas are complex and validation is
expensive. Is there is any way to make getElementById work without full
validation ? I tried setting the
"http://apache.org/xml/features/validation/schema/augment-psvi" to be
false. But that causes a NullPointerException on calling
normalizeDocument().

b. The second issue is with regard to symbol tables. I noticed that in
addition to the symbol table there is a feature
"http://xml.org/sax/features/string-interning" which is true by default.

 Are names being put in both the symbol table and the interned table?
There may some speed issues with this.

 Is there a way to get Xerces to put the values of attributes in
the symbol table? The way I do it now is by intercepting SAX events, but
iterating over all the attributes is quite expensive.

Im using the Xerces CVS build checked out early last week.

Thanks,
Nikhil





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


Re: Xerces validation and symbol table features

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Nikhil Dinesh <ni...@seas.upenn.edu> wrote on 07/19/2004 04:22:01 PM:

> b. The second issue is with regard to symbol tables. I noticed that in
> addition to the symbol table there is a feature
> "http://xml.org/sax/features/string-interning" which is true by default.

In Xerces, this feature is effectively read-only. You cannot set it to 
false. The symbol table does string interning.

>  Are names being put in both the symbol table and the interned table?
> There may some speed issues with this.

Only when a new identifier is added to the symbol table. The next time the 
symbol table sees that sequence of characters it will return the interned 
instance of the string instead of creating a new string.

>  Is there a way to get Xerces to put the values of attributes in
> the symbol table? The way I do it now is by intercepting SAX events, but
> iterating over all the attributes is quite expensive.

There is no such feature.

> Im using the Xerces CVS build checked out early last week.
> 
> Thanks,
> Nikhil
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
> 

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org