Jump to content

J.T.

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About J.T.

  • Rank
    Newbie
  1. I'm still interested in finding a solution to my problem, however I am getting closer with the following configuration. One limitation still exists though, any of the items in the choice can repeat:<xsd:complexType name="AgentInformationListType"><xsd:sequence><xsd:element name="AgentInformation" minOccurs="1" maxOccurs="1"><xsd:complexType><xsd:sequence><xsd:element name="CorrelationId" type="xsd:string" minOccurs="0" maxOccurs="1" /><xsd:group ref="GroupChoice" minOccurs="1" maxOccurs="3" /></xsd:sequence></xsd:complexType></xsd:element></xsd:sequence></xsd:complexType><xsd:group name="GroupChoice"><xsd:choice><xsd:element name="NASD_CRD_Number" type="xsd:string" minOccurs="1" maxOccurs="1" /><xsd:element name="AlternateID" type="xsd:string" minOccurs="1" maxOccurs="1" /><xsd:element name="TaxID" type="xsd:string" minOccurs="1" maxOccurs="1" /></xsd:choice></xsd:group>Any thoughts?
  2. I've tried a number of scenarios, but can't seem to hit on the correct configuration.I need to modify the complextype below to adhere to the following requirements: 1. Although the NASD_CRD_Number, AlternateID & TaxID elements are optional, at least one of threee elements must be present on the request 2. Although one of the three elements must be present on the request, the remaining two elements can also be present. 3. An element can only be present once. <xsd:complexType name="AgentInformationListType"> <xsd:sequence> <xsd:element name="AgentInformation" minOccurs="1" maxOccurs="1"> <xsd:complexType> <xsd:all> <xsd:element name="CorrelationId" type="xsd:string" minOccurs="0" maxOccurs="1" /> <xsd:element name="NASD_CRD_Number" type="xsd:string" minOccurs="0" maxOccurs="1" /> <xsd:element name="AlternateID" type="xsd:string" minOccurs="0" maxOccurs="1" /> <xsd:element name="TaxID" type="xsd:string" minOccurs="0" maxOccurs="1" /> </xsd:all> </xsd:complexType> </xsd:element> </xsd:sequence></xsd:complexType>The closest I've come to a solution is below (please no snickering), but it has the following limitations: 1. a new element (XXX) is introduced into the structure 2. it doesn't prevent one of the three elements from repeating <xsd:complexType name="AgentInformationListType"> <xsd:sequence> <xsd:element name="AgentInformation" minOccurs="1" maxOccurs="1"> <xsd:complexType> <xsd:all> <xsd:element name="CorrelationId" type="xsd:string" minOccurs="0" maxOccurs="1" /> <xsd:element name="XXX" type="XXX" minOccurs="0" maxOccurs="1" /> </xsd:all> </xsd:complexType> </xsd:element> </xsd:sequence></xsd:complexType><xsd:complexType name="XXX"> <xsd:choice minOccurs="1" maxOccurs="3"> <xsd:element name="NASD_CRD_Number" type="xsd:string"/> <xsd:element name="AlternateID" type="xsd:string"/> <xsd:element name="TaxID" type="xsd:string"/> </xsd:choice></xsd:complexType>I also attempted to use xsd:group with the "ref" parameter, but couldn't get it to validate.Thanks !
×
×
  • Create New...