Suppose, I have this in xml:

<Parent>
  <child>bla-bla</child>
</Parent>

In the schema there's:
        <xs:element name="Parent" type="ParentType"/>
        <xs:complexType name="ParentType">
                <xs:sequence>
                        <xs:element ref="dependent"/>
                </xs:sequence>
        </xs:complexType>


        <xs:element name="dependent" type="dependentType"/>
        <xs:complexType name="dependentType">
                ... Bla-bla...
        </xs:complexType>

        <xs:element name="son" type="childType"
substitutionGroup="dependent"/>
        <xs:element name="daughter" type="childType"
substitutionGroup="child"/>

        <xs:complexType name="childType">
                <xs:complexContent>
                        <xs:extension base="dependentType">
                ... Bla-bla...
                        </xs:extension>
                </xs:complexContent>
        </xs:complexType>


Now, in my Java code, one component gets a reference of "son" element:

ParentType pt =...
DependentType dt = pt.getDependentType();


If I pass the reference of dt to another component, how would this
component find out that dt is actually "son" or "daughter"? I need to
know dt's element name.

Thanks
argyn

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to