Hi,
I would greatly appreciate any pointers with the
following problem:
In the generated code in the Descriptor is looking for
the clear[ChildElement] method
in the element class while the element class provides
the removeAll[ChildElement] method. See the
example below. I am also attaching the short schema to
demonstrate the
problem.
Thanks a lot in advance for any help!
Tony.
GroupDescriptor.java constructor
GroupDescriptor()
{
// omitted ...
//-- _parameterGroupList
desc = new
XMLFieldDescriptorImpl(ParameterGroup.class,
"_parameterGroupList", "ParameterGroup",
NodeType.Element);
handler = new org.exolab.castor.xml.XMLFieldHandler()
{
// omitted ...
public void resetValue(Object object)
throws
IllegalStateException,
IllegalArgumentException {
try {
Group target = (Group) object;
// !!!!!!!! PROBLEM HERE as there
is no
// "clearParameterGroup" method in
the
// Group class
target.clearParameterGroup();
// !!!!!!!!!!!
} catch (java.lang.Exception ex) {
throw new
IllegalStateException(ex.toString());
}
}
// omitted ...
}
// Same problem is there for the
//-- _parameterList
}
-------------------- Demo Schema Attached
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:complexType name="group" mixed="true">
<xs:sequence>
<xs:element
ref="ParameterGroup" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element ref="Parameter"
minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name"
type="xs:string" use="required"/>
</xs:complexType>
<xs:element name="ParameterGroup"
type="group"/>
<xs:element name="ParameterMeta"
type="group"/>
<xs:element name="Parameter">
<xs:complexType>
<xs:sequence>
<xs:element
ref="ParameterMeta" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="name"
type="xs:string" use="required"/>
<xs:attribute name="value"
type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
--
Best regards,
Anthony
mailto:[EMAIL PROTECTED]
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email