[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    RE: getting access to annotations.
From:       "Lawrence Jones" <ljones () bea ! com>
Date:       2005-10-31 17:29:22
Message-ID: 4B2B4C417991364996F035E1EE39E2E10363ED98 () uskiex01 ! amer ! bea ! com
[Download RAW message or body]

Hi Marius

Please see a previous response to a similar issue -
http://mail-archives.apache.org/mod_mbox/xmlbeans-user/200509.mbox/%3c4B
2B4C417991364996F035E1EE39E2E103564F2D@uskiex01.amer.bea.com%3e. I think
that should help you.

Cheers,

Lawrence

> -----Original Message-----
> From: Marius Gleeson [mailto:mg@subscribe.audumla.net]
> Sent: Sunday, October 30, 2005 3:43 PM
> To: user@xmlbeans.apache.org; xmlbeans-dev@xml.apache.org
> 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: dev-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: dev-help@xmlbeans.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic