Jessica Perry Hekman schrieb:
:
> I subclassed DOMParser:

That's the hint I needed!

I allways forget about the simplest OOP effords (did too much C
programming ;-)

:
> > Do you construct thie InsertableElementsInfo completely new (e.g.
> > based on the schema tree - should be easy), or is it possible to get
> > (at least) the possibleChildren[] from where ever the
> > parser/validator stored this info on parsing the DTD/schema?
> 
> I'm not sure I understand your question, but here's the relevant method.

In difference to your code (using the existing child nodes) I have
to be able to extend a document with optional elements which may not
exist yet (or even build a completely new document!). That's why I
have to use the info from the DTD/schema about what children are
allowed under a certain element. The setup of InsertableElementInfo
will be quite the same, just with another source.

:
> After poking around my code, I discovered that I actually added
> getGrammar() to XMLValidator:
> 
>     public Grammar getGrammar() {
>         return(this.fGrammar);
>     }
> 
> and made my clients use that modified version of Xerces. Ouch. Perhaps
> this makes this approach unusable by you.

Ok, this could be done by subclassing XMLValidator (or not?).

As MyDOMParser is extending DOMParser (which is again extending
XMLParser), it should be possible to force it to use myXMLValidator.

I will try.
> 
> In general, I found that there were useful methods that I wanted to use in
> Xerces, but that they were no longer supported.  I could get things
> working, but it took modifications (I don't think that was the only place
> where I modified Xerces). I think that Xerces2 is going to support
> validator access in a more direct fashion.

May be, but looking for the methodes I missed, was my first contact
to Xerces2, this Morning ;-)
-- 
----------------------------------------------------  _____
 Andreas Th�nnessen           mailto:[EMAIL PROTECTED]    /|
 Philosys Software GmbH     http://www.philosys.de/   /_|
---------------------------------------------------- /  |
begin:vcard 
n:Th�nnessen;Andreas
tel;cell:(+49)-175-9633552
tel;fax:(+49)-89-321407-12
tel;home:(+49)-8031-807856
tel;work:(+49)-89-321407-22
x-mozilla-html:FALSE
url:http://www.philosys.de/
org:Philosys Software GmbH;<BR><DIV align="left"><IMG SRC=http://www.philosys.de/~andreas/img/philosys.gif></DIV>
adr:;;Edisonstr. 6;Unterschlei�heim;Bayern;85716;Germany
version:2.1
email;internet:[EMAIL PROTECTED]
title:Dipl. Ing. FH Elektrotechnik / Datentechnik
fn:Andreas Th�nnessen
end:vcard

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to