Thanks Arnaud.

The CVS version fixed the problem.

However, I found two other problems that are still in the CVS version. I found my way around them but would like to fix the problems ideally for posterity. The problems are:

Problem with XML language datatype in attribute declarations
---------------------------------------------------------------

Using the following attribute declaration:

  <attribute name = "lang" default = "en-us" form = "qualified" type = "language"/>

caused Castor XML give following warning and not produce proper code:

Warning: The W3C datatype language is not currently supported by Castor Source Generator.

I changed the type to string and it worked fine.

A simple fix might be to treat the pre-defined language attribute the same as string attribute even if extra validaton is
not performed.

Problem with minOccurs/maxOccurs on sequence elements
------------------------------------------------------------

The following sequenec declaration generates no warnings or errors but creates bad code that does not compile as it is missing some
castor methods:

<sequence minOccurs = "0" maxOccurs = "unbounded">
    <element ref = "tns:SpecificationLink"/>
</sequence>

The problem is fixed if it is changed to:

<sequence>
    <element ref = "tns:SpecificationLink" minOccurs = "0" maxOccurs = "unbounded"/>
</sequence>

To see the pre and post workaround versions of the input file I used please use the following URLS (pre, post order):

 http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/~checkout~/ebxmlrr/ebxmlrr-spec/misc/schema/rim.xsd?rev=1.27&content-type=text/plain
 http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/~checkout~/ebxmlrr/ebxmlrr-spec/misc/schema/rim.xsd?rev=1.28&content-type=text/plain
 

Please let me know if I can be of more assistance. Thanks again for a great tool. I would like to get more involved with Castor over time.

Arnaud Blandin wrote:

Hi Faruk,

thanks for you support in Castor, I've some small comments:

->Bug Fix Submission
->I would like to start with submitting a hopefully straight forward bug fix for a missing null check. If over time I become a regular user of castor then I ->would like to contribute to the project and have commiter status.
->Attached please find the file AttributeDecl. serach for "//??FSN" to find the area where I have made the change. Sorry I should have kept the original and ->sent the diff. Will show better discipline in future. Based on my test case (see attached rim.xsd), without the fix I was getting an NPE crash. After the ->fix it generated code that seems to look good. Please let me know how you prefer to get bug fixes in future and what it would take for me to be a commiter ->to the CVS repository directly in future.

The diff would be a very good idea for the future (and even a patch file). For the bug you are
reporting, is should be already fixed in the CVS.For the moment we are using a null simpleType
to represent an XML Schema ur-type.

->Bug Report
->.....skipped
->1. What is teh warning telling me?
The warning is telling you that you are importing other schemas and Source code is not generated for the
imported schema, you have to do it yourself.
If a Schema A imports a schema B, the source code for A will reference the source code for B but will not
generate it, you have to do it manually.

->2. How can I work around the crash?

Maybe you should try the CVS version, it might fix this problem also.

Thanks again,

Arnaud
 

-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

--
Regards,
Farrukh
 
begin:vcard 
n:Najmi;Farrukh
tel;work:781-442-0703
x-mozilla-html:FALSE
url:www.sun.com
org:Sun Microsystems;Java Software
adr:;;1 Network Dr. MS BUR02-302;Burlington;MA;01803-0902;USA
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Farrukh Najmi
end:vcard


Reply via email to