>Hmmm.. We do plan to implement DOM L3 specs and although we did not
>discuss implementing Abstract Schema [AS] module (that allows editing
>and querying grammars), the APIs are there. Do we want to provide
>another way to access grammar??
>I am not sure how DTDContentModelHandler is useful for editor writers.
>In the world of XML Schemas, you better also provide support for editing
>XML Schemas as well as DTDs, and DTDContentModelHandler provides way to
>little information..

>My point is, I believe if we ever want to provide in Xerces APIs for
>editing/querying AS (DTD, XML Schemas, other grammars), we better do it
>by implementing standard DOM APIs

Would be very much appreciated, especially support for ASLS. We presently
use Grammar objects to generate code completion support in Netbeans. And it
was one uphill task getting there, in the process found two bugs in
SimpleContentModel and DFAContentModel, both in whatCanGoHere(), which I
reported to Xerces User List(wrongfully, hence reporting here now).  Details
below.

At present we also generate node heirarchy for DTD's structural aspect using
custom classes that map somewhere between Xerces implementation of Makup
Declarations and the ASLS. In case ASLS implementation is accepted by the
Xerces community, we could very easily move our present implementation to
it. Including the Markup Decaration Customizers.

The module is still in working draft, though primitive work(from a previous
implmentation) is available at the homepage. We do plan a request to you
guys( since you are the brains behind it all ;-) ) for some comments on the
proposal a little later in the week or maybe next week for your opinion,
once we are done with the basics.

I'm new to this list and to xerces, so am not familiar with the ethos,
please excuse
anything you don't like and don't hesitate to correct me.

Sandeep Randhawa
@author XML Module for Netbeans
http://xml.netbeans.org

-----Original Message-----
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>;
[EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, July 04, 2001 2:47 AM
Subject: [Bug 1764] - bug in whatCanGoHere() in SimpleContentModel


>http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1764
>
>*** shadow/1764 Sun May 20 17:27:29 2001
>--- shadow/1764.tmp.11117 Tue Jul  3 14:12:31 2001
>***************
>*** 1,19 ****
>! Bug#: 1764
>! Product: Xerces-J
>! Version: unspecified
>! Platform: Other
>! OS/Version: Other
>! Status: NEW
>! Resolution:
>! Severity: Normal
>! Priority:
>! Component: Other
>! AssignedTo: [EMAIL PROTECTED]
>! ReportedBy: [EMAIL PROTECTED]
>! URL:
>! Cc:
>! Summary: bug in whatCanGoHere() in SimpleContentModel
>!
>  This bug returns empty result in case there are two possible options and
you
>  have entered the first one eg. <HTML> <HEAD></HEAD> @ this point there it
>  returns empty Rather than <BODY>.
>--- 1,19 ----
>!
+===========================================================================
=+
>! | bug in whatCanGoHere() in SimpleContentModel
|
>!
+---------------------------------------------------------------------------
-+
>! |        Bug #: 1764                        Product: Xerces-J
|
>! |       Status: RESOLVED                    Version: unspecified
|
>! |   Resolution: LATER                      Platform: Other
|
>! |     Severity: Normal                   OS/Version: Other
|
>! |     Priority: High                      Component: Other
|
>!
+---------------------------------------------------------------------------
-+
>! |  Assigned To: [EMAIL PROTECTED]
|
>! |  Reported By: [EMAIL PROTECTED]
|
>! |      CC list: Cc:
|
>!
+---------------------------------------------------------------------------
-+
>! |          URL:
|
>!
+===========================================================================
=+
>! |                              DESCRIPTION
|
>  This bug returns empty result in case there are two possible options and
you
>  have entered the first one eg. <HTML> <HEAD></HEAD> @ this point there it
>  returns empty Rather than <BODY>.
>***************
>*** 45,47 ****
>--- 45,52 ----
>              info.childCount--;
>          }
>  /********************************************************/
>+
>+ ------- Additional Comments From [EMAIL PROTECTED]  2001-07-03
14:12 -------
>+ whatCanGoHere() is not maintainable code: parser don't use this code
internally.
>+ It was probably related to re-validation mechanism available in earlier
>+ xml4j/Xerces code. We plan to revisit re-validation in Xerces2.
>

I couldn't understand "whatCanGoHere() is not maintainable code".

If there is a bug and somebody provides a fix, that is not to be patched
because the parser dosen't use it internally. That seems to be a pretty
absurd reasoning. I can understand if it has to be located and a patch
found, that needs some effort.

I'll jump in and find the reason behind DFAContentModel bug, but if it is
not going to be fixed then there is no point.

-----Original Message-----
From: Sandeep Randhawa <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Sunday, July 01, 2001 1:05 PM
Subject: SimpleContentModel Bug


>Hi,
>     I would like to report a couple of bugs.
>1. org.apache.xcerces.validators.common.SimpleContentModel.
>Method: whatCanGoHere(boolean fullyValid, InsertableElementsInfo info)
>throws Exception
>
>Code:
>        for (int index = info.insertAt; index < info.childCount; index++) {
>            info.curChildren[index].setValues(info.curChildren[index+1]);
>        }
>        info.childCount--;
>
>Should be:
>        if(info.insertAt < info.childCount){
>            for (int index = info.insertAt; index < info.childCount;
>index++) {
>
>info.curChildren[index].setValues(info.curChildren[index+1]);
>            }
>            info.childCount--;
>        }
>
>Reason is following. eg. <html> has two child options <head> and <body>. In
>the case that <head> is already present as a child of <html> following
>alreadyChildren are passed in:  <head><null> where info.insertAt is 1.
>Since, info.insertAt is not less than info.childCount, both are 1. The
buggy
>code dosen't go into the for loop, but still decrements info.childCount,
>leading to aberrant result. So, only in the case that info.insertAt is less
>than info.childCount should the childCount be decremented.
>
>2. DFAContentModel
>For some reason(I din't go too much in detail) in the same method as above.
>
>                if (fElemMap[elemIndex].uri == curElem.uri &&
>                    fElemMap[elemIndex].localpart == curElem.localpart)
>
>fElemMap[elemIndex].localpart actually points to the Qname's rawname.
>
>That is somewhere QName.localpart and QName.rawname have been switched. You
>may try this by passing in the StringPool and looking at what it prints
out.
>
>Also, is there some standard interface for accessing whatCanGoHere(). Right
>now the way I do it, is to instantiate the Grammar using
>MLDTDScanner( haven't worked on schema yet) and then call the methods on
it.
>But I have to retain all the QName's as are reported by XMLDTDScanner in a
>Map and get the QName's using a call to get(key).
>
>If there is not. I was wondering if one could be made. Since, I don't know
a
>lot about xerces maybe someone could write a skeleton code and I'll attempt
>to do the rest. Also, could you please fix the above bugs in the next
>version. I did report the bugs on bugzilla 1764 Bug filed xerces, but
>apparently nobody looked it up, before releasing the next version.
>
>Thanks.
>



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

Reply via email to