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 Andy Clark <an...@apache.org> on 2000/10/09 23:16:14 UTC

Re: Progress on getting RevalidatingDOMParser running under 1.2.0]

Ken wrote:
> A couple questions if you have a moment:
> * XMLValidator.checkContent() is now private -- is it safe to make it
> public so it can be called from the RevalidatingDOMParser class? 
> * Is it still safe to call checkContent() repeatedly after the inital
> parse has been done and modifications to the DOM tree are made?
> * What did StringPool.getDeclaration() do under the old parser? What is
> the equivalent functionality under 1.2.0?

If you're willing to work on getting RevalidatingDOMParser up
and running again, I'll do whatever is needed for you. Because
we've had complaints about the RevalidatingDOMParser being in
the package even though it's not functioning, Jeff already
removed it from the repository. However, once you get it 
working again, we can put it back into the repository.

The XMLValidator#checkContent method can be made public if
you want. Just keep working on the RevalidatingDOMParser by
making local changes. Then, once you get it working we'll
make all of the changes in CVS needed to integrate it back
into Xerces.

The StringPool#getDeclaration method was used to keep an
association between an element's name (which was a symbol
index into the string pool) and the element declaration info
for that element in the XMLValidator. In the current version,
we've moved that information out of the validator and into
a grammar object. Therefore, the string pool doesn't need to
keep that association anymore. 

There are methods on the Grammar object that allows you to
look up an element declaration by using the element's name.
Check out the public API on Grammar for more information.
Basically, you use the element name index in order to get 
the element declaration index which can then be used to
query information about the element declaration. One hint:
top level element declarations have a scope of -1. That
should be enough information to get you on your way.

-- 
Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org