Hi Andy,
It's a credit to the original implementation that decoupling them wasn't
that hard. The main things that were necessary were to:
- make a reset method on the scanner to give it a symbolTable etc. This
also enables us to reuse scanner objects.
- to give it an XMLEntityManager.ScannedEntity data member corresponding to
the current entity, and set this whenever the current entity changes in the
entity manager
- to make the entity manager's print method static (this is just for
debugging, so will get compiled away anyway)
The only moderately ugly bit is that the scanner needs a reference back to
the manager to call its endEntity method, which calls out to the entity
handler and pops the entity stack.
Cheers,
Neil
Neil Graham
XML Parser Development
IBM Toronto Lab
Phone: 905-413-3519, T/L 969-3519
E-mail: [EMAIL PROTECTED]
|---------+---------------------------->
| | Andy Clark |
| | <[EMAIL PROTECTED]|
| | > |
| | |
| | 12/03/2002 03:39 |
| | PM |
| | Please respond to|
| | xerces-j-dev |
| | |
|---------+---------------------------->
>---------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| To: [EMAIL PROTECTED]
|
| cc:
|
| Subject: Re: does anyone care about XMLEntityScanner?
|
|
|
|
|
>---------------------------------------------------------------------------------------------------------------------------------------------|
[EMAIL PROTECTED] wrote:
> my own purposes in implementing XML 1.1 support, I've found it useful to
> take XMLEntityManager.EntityScanner--the only concrete implementation of
> XMLEntityScanner in our codebase--out of XMLEntityManager and make it a
> freestanding class. (This way I can extend it easily with an XML 1.1
How is this done considering that the inner class
accesses fields and methods of the outer class? My
question is more in terms of design.
--
Andy Clark * [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]