Hi Marius Please see a previous response to a similar issue - http://mail-archives.apache.org/mod_mbox/xmlbeans-user/200509.mbox/%3c4B [EMAIL PROTECTED] I think that should help you.
Cheers, Lawrence > -----Original Message----- > From: Marius Gleeson [mailto:[EMAIL PROTECTED] > Sent: Sunday, October 30, 2005 3:43 PM > To: user@xmlbeans.apache.org; [EMAIL PROTECTED] > Subject: getting access to annotations. > > Hi I am trying to get access to some schema annotations that I have > attached to an element tag. As far as I can tell the schema interfaces > do not allow me to get to them. Can someone confirm this for me, or is > there another way to get to them > > Sample of Schema, > > <xs:complexType name="Field"> > <xs:sequence> > <xs:element name="displayName" type="xs:string" default="Not > Defined"> > <xs:annotation> > <xs:appinfo> > . > . > . > </xs:appinfo> > </xs:annotation> > </xs:element> > </xs:sequence> > <xs:attribute name="id" type="xs:string" default="ID not set"/> > </xs:complexType> > <xs:element name="field" type="db:Field"/> > > The following doesnt work, because the type for displayname is > xs:string, and the annotations would have to be > attached to the xs:string type, which is not possible. > > Field field = ..... > SchemaType s = field.xgetDisplayName().schemaType() > SchemaAnnotation = s.getAnnotation(); > > So next I tried getting the schema particle for the displayname element, > but there is no getAnnotation method for the ElementProperty inteface. > > Field field = ..... > QName name = field.xgetDisplayName().newCursor().getName(); > SchemaAnnotation s = field.schemaType().getElementProperty(name). .. .. > ; > > Any other ideas? > Marius Gleeson. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]