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]

Reply via email to