Unfortunately xerces fails to provide this. You could do this by checking if
this element is in any group(by getting XercesGroupInfo) and deduce this for
the complex type. But it does not work for nested groups. G1 refers to G2.
Kiran

-----Original Message-----
From: Sir Woody Hackswell [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 3:20 PM
To: [EMAIL PROTECTED]
Subject: Detecting if a Schema element contains groups


I'm playing with SEnumVal, and I would like to print out if a node has
groups or group references in it.  It seems that SEnumVal only shows
Elements, not Groups at all.  It does show all the elements in the group.  However, 
I'd like an accounting of both.  Is this possible?  I need to pull
the annotation out of the group itself.

I'm still new to the API, so please don't beat me too hard. ;)

Example schema:

<xs:element name="bubba">
<xs:complexType>
  <xs:sequence>
    <xs:group ref="ME"/>
    <xs:group ref="YOU"/>
  </xs:sequence>
</xs:complexType>
</xs:element>
...
...

<xs:group name="ME">
  <xs:annotation>...</xs:annotation>
  <xs:sequence>
    <xs:element name="ISeeYou" type="xs:string">
    <xs:element name="YouSeeMe" type="xs:string">
  </xs:sequence>
</xs:group>


I get the usual dump about: bubba, ISeeYou, and YouSeeMe.

I never get any information under bubba about the groups "ME" and "YOU".

Thanks!


-----
[EMAIL PROTECTED]       http://sir.woody.hackswell.com


---------------------------------------------------------------------
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]

Reply via email to