[prev in list] [next in list] [prev in thread] [next in thread]
List: castor-dev
Subject: Re: [castor-dev] bug and fix for generation with type
From: Dean Hiller <dhiller () avaya ! com>
Date: 2002-12-31 22:05:38
[Download RAW message or body]
whoops, ignore my fix. I found my fix to be incomplete. Elements with
anonymous types still have to be generated. I need to look further at
this one thursday.
sorry about that,
Dean
Dean Hiller wrote:
> Generation from attached schema generates code that doesn't compile if
> the type method is used to generate the code. It generates a class that
> inherits from itself. I found this can be fixed by changing line 1161
> in SourceGenerator(inside function createClasses(Schema, SGStateInfo)
> from
> while(structures.hasMoreElements())
> createClasses((ElementDecl)structures.nextElement(), sInfo);
> to
> while(structure.hasMoreElements() && !mappingSchemaElement2Java())
> createClasses((ElementDecl)structures.nextElement(), sInfo);
>
>
> I don't know if this is the correct fix to make for the problem. If it
> is,
> Can someone please make this change? I will submit a test case after
> someone responds with what is wrong with my previous test case that I am
> still in the process of writing. I can't figure out why it compiles
> fine for me but does not compile fine for JUnit inside the CTF when the
> test case is run.
>
> thanks,
> Dean
>
>
> ------------------------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema targetNamespace="http://www.ecma.ch/standards/ecma-323/csta" \
> xmlns:csta="http://www.ecma.ch/standards/ecma-323/csta" \
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" \
> attributeFormDefault="unqualified"> <xsd:annotation>
> <xsd:documentation>CSTA-media-services</xsd:documentation>
> </xsd:annotation>
> <xsd:complexType name="MediaCallCharacteristics">
> <xsd:sequence>
> <xsd:element name="mediaClass" type="csta:MediaClass"/>
> <xsd:element name="delayTolerance" type="xsd:long" minOccurs="0"/>
> </xsd:sequence>
> </xsd:complexType>
>
> <xsd:element name="mediaCallCharacteristics" type="csta:MediaCallCharacteristics"/>
>
>
>
>
> <xsd:complexType name="MediaClass">
> <xsd:sequence>
> <xsd:element name="voice" type="xsd:boolean" minOccurs="0"/>
> <xsd:element name="data" type="xsd:boolean" minOccurs="0"/>
> <xsd:element name="image" type="xsd:boolean" minOccurs="0"/>
> <xsd:element name="audio" type="xsd:boolean" minOccurs="0"/>
> <xsd:element name="other" type="xsd:boolean" minOccurs="0"/>
> <xsd:element name="notKnown" type="xsd:boolean" minOccurs="0"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
>
>
[Attachment #3 (text/html)]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body>
whoops, ignore my fix. I found my fix to be incomplete. Elements with \
anonymous types still have to be generated. I need to look further at this one \
thursday.<br> sorry about that,<br>
Dean<br>
<br>
Dean Hiller wrote:<br>
<blockquote type="cite" cite="mid3E12126C.C3BF00AA@avaya.com">
<pre wrap="">Generation from attached schema generates code that doesn't compile if
the type method is used to generate the code. It generates a class that
inherits from itself. I found this can be fixed by changing line 1161
in SourceGenerator(inside function createClasses(Schema, SGStateInfo)
from
while(structures.hasMoreElements())
createClasses((ElementDecl)structures.nextElement(), sInfo);
to
while(structure.hasMoreElements() && !mappingSchemaElement2Java())
createClasses((ElementDecl)structures.nextElement(), sInfo);
I don't know if this is the correct fix to make for the problem. If it
is,
Can someone please make this change? I will submit a test case after
someone responds with what is wrong with my previous test case that I am
still in the process of writing. I can't figure out why it compiles
fine for me but does not compile fine for JUnit inside the CTF when the
test case is run.
thanks,
Dean
</pre>
<pre wrap="">
<hr width="90%" size="4">
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace=<a class="moz-txt-link-rfc2396E" \
href="http://www.ecma.ch/standards/ecma-323/csta">"http://www.ecma.ch/standards/ecma-323/csta"</a> \
xmlns:csta=<a class="moz-txt-link-rfc2396E" \
href="http://www.ecma.ch/standards/ecma-323/csta">"http://www.ecma.ch/standards/ecma-323/csta"</a> \
xmlns:xsd=<a class="moz-txt-link-rfc2396E" \
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a> \
elementFormDefault="qualified" attributeFormDefault="unqualified"> \
<xsd:annotation> \
<xsd:documentation>CSTA-media-services</xsd:documentation> \
</xsd:annotation> <xsd:complexType name="MediaCallCharacteristics">
<xsd:sequence>
<xsd:element name="mediaClass" type="csta:MediaClass"/>
<xsd:element name="delayTolerance" type="xsd:long" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="mediaCallCharacteristics" \
type="csta:MediaCallCharacteristics"/>
<xsd:complexType name="MediaClass">
<xsd:sequence>
<xsd:element name="voice" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="data" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="image" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="audio" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="other" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="notKnown" type="xsd:boolean" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</pre>
</blockquote>
<br>
</body>
</html>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
minimalist@exolab.org with a subject of:
unsubscribe castor-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic