Hi there,
I must create a type "site" , derivated from "person" and to which are
added "nue" and "gln".
It is actually described like this :
<xsd:complexType name="person">
<xsd:annotation>
<xsd:documentation>
Person identification
Pcvqid : id (required)
Name : Full Name (not required, but helpful)
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="pcvqid" type="xsd:int" maxOccurs="1"
minOccurs="1">
</xsd:element>
<xsd:element name="name" maxOccurs="1" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\w.*"></xsd:pattern>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="site">
<xsd:complexContent>
<xsd:extension base="pcvq:person">
<xsd:sequence>
<xsd:element name="NUE" type="pcvq:NUEType"
maxOccurs="1"
minOccurs="0"></xsd:element>
<xsd:element name="GLN" type="pcvq:GLNType"
maxOccurs="1"
minOccurs="0"></xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
My problem is that i want to receive at least one of the 3
informations pcvqid, nue or gln, but i also must accept to get them
all or only two of them. My only restriction is that each kind of
information can't occurs more than once.
I.E. (without maching patterns):
<site>
<pcvqid>117118</site>
</site>
or
<site>
<pcvqid>117118</site>
<nue>9.123.564.529</nue>
</site>
or
<site>
<pcvqid>117118</site>
<nue>9.123.564.529</nue>
<gln>4568794519814</gln>
</site>
or
<site>
<pcvqid>117118</site>
<name>Michu</name>
<nue>9.123.564.529</nue>
<gln>4568794519814</gln>
</site>
are all acceptable, but also
<site>
<name>Michu</name>
<gln>4568794519814</gln>
</site>
or
<site>
<pcvqid>117118</site>
<nue>9.123.564.529</nue>
</site>
and any kind of combination like this.
An non acceptable samble would be something like this :
<site>
<pcvqid>117118</site>
<name>Michu</name>
<nue>9.123.564.529</nue>
<nue>9.123.564.528</nue>
<gln>4568794519814</gln>
</site>
How can i define those rules in the xsd ?
--
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net