Hi Pavani,

Thanks for your updated AllContentModel.  Aside from the fact that it still
didn't compile (neither did the patch you submitted for CMBuilder,
incidentally), the code looked fine to me.  So I simply fixed the errors
and committed everything.

As to the indenting:  One really useful tip I've found is to make sure the
editor you use for development always expands tabs into spaces.  The
convention we've come to use is that one tab=4 spaces.  So if you can get
your editor to do this (if you use vi/vim then 'set ts=4', 'set et' will do
it for you), then your code will be much more readable.

Cheers,
Neil

Neil Graham
XML Parser Development
IBM Toronto Lab
Phone:  905-413-3519, T/L 969-3519
E-mail:  [EMAIL PROTECTED]



Pavani Mukthipudi <[EMAIL PROTECTED]> on 10/04/2001 06:05:40 AM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  Re: code for XSAllContentModel



Hi Neil,

> 2.  in oneTransition:  if the current state is less than 0, we still
> must check whether the QName given may occur in the contentModel.

> 3.  Related to 2., if the current state is XSCMValidator.FIRST_ERROR,
> then XSAllCM should set the state to
> XSCMValidator.SUBSEQUENT_ERROR so the validator doesn't throw another
> error for this (bad) contentModel.
>

Yes, i have made the changes.


> 4.  Also in oneTransition, you have
>     fElementsSeen[i] = true;
>
> The trouble with this is that, if we have different parsers all
> accessing one grammar, if we store state inside the content models
> then we have all kinds of thread-safety issues.  That's why we pass an
> array of ints as the state to oneTransition rather than simply an
> integer:  this way we can keep the state in an object that the
> validator owns rather than doing so in the contentModel.
>

Thanks for the feedback. I have removed the above array and i'm
storing the state of 'i'th element in currentState[i+1]. The state
of the ContentModel is stored in currentState[0]. Hope this is fine.


> 5.  Maybe it's just my text editor/e-mail client combination, but the
> indenting in this file looks a bit less than consistent.
>

It looks quite fine for me.

Please find the attached XSAllCM with the above changes.


Regards,
Pavani

--

Pavani Mukthipudi
Sun Microsystems Inc.

Phone: 080 - 2298989   Extn: 87390
(See attached file: XSAllCM.java)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

XSAllCM.java

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

Reply via email to