logo       

RE: Problems trying to use annotation support in v2: msg#00114

text.xml.xmlbeans.user

Subject: RE: Problems trying to use annotation support in v2

The "SchemaType for the name attribute"? I don't think you are using the API
correctly.
Try getting the annotation off the "name" element directly instead, since the
element itself is annotated, not the type.

Radu

-----Original Message-----
From: Jim McMaster [mailto:jmcmaster@xxxxxxxxx]
Sent: Wednesday, January 19, 2005 9:25 AM
To: user@xxxxxxxxxxxxxxxxxxx
Subject: Problems trying to use annotation support in v2


I am trying to use the v2 annotation support to get access to appinfo
elements in a schema. I can send the entire schema and the code that
read it if that would help, but it is long.

I have defined the following type:

<xs:complexType name="category">
<xs:complexContent>
<xs:extension base="aptas:baseEntity">
<xs:sequence>
<xs:element type="aptas:localizedString" name="name"
minOccurs="1" maxOccurs="unbounded">
<xs:annotation>
<xs:appinfo>
<papyrus:papyrusAppinfo>
<papyrus:sourceClass>
com.aptas.alexandria.vo.Category
</papyrus:sourceClass>
<papyrus:sourceMethod>
getName
</papyrus:sourceMethod>
</papyrus:papyrusAppinfo>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element type="aptas:property" name="property"
minOccurs="1" maxOccurs="unbounded">
<xs:annotation>
<xs:appinfo>
<papyrus:papyrusAppinfo>
<papyrus:sourceClass>
com.aptas.alexandria.vo.Category
</papyrus:sourceClass>
<papyrus:sourceMethod>
getProperties
</papyrus:sourceMethod>
</papyrus:papyrusAppinfo>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

When I look at the SchemaType for the name attribute in the debugger,
the annotation field is null. Is this a bug, or am I doing something
wrong?

--
Jim McMaster
mailto:jmcmaster@xxxxxxxxx


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise