Re: XSD with "required" attribute option related query

Rajneesh Shukla <[email protected]> Mon, 24 Feb 2020 20:30:31 +0530
Newsgroups gmane.text.xml.schema.devel
Message-ID <CAFAat38qhHcGoTuJXzNW7Z_D0GXjtr=2Oz1cvPa_QD6-kJTk5Q@mail.gmail.com>
--0000000000007bb9a2059f53a219
Content-Type: text/plain; charset="UTF-8"

Hi Mukul,

One more help please:

Is it possible to impose required constraint at value level?
for example in below xml, I wnt to make sure value for alias1, coli1 and
operator is always populated in condition element within where element.

functionalView name="CLAIMS_FV"  description="Learning Purpose">

  <columns>

    <column name="CLAI.CODE"   columnAlias="CODE"  description="The code of
the claim" />

    <column name="CLLI.CODE"   columnAlias="LINE_CODE"  description="The
code of the claim line" />

    <column name="PROC.CODE"   columnAlias="PROC_CODE"  description="The
code of the claim line procedure" />

  </columns>

  <fromviews>

    <fromview name="CLAIMS_V" alias="CLAI" />

    <fromview name="LINES_V" alias="CLLI" />

    <fromview name="PROC_V" alias="PROC" />

    <fromview name="PROV_V" alias="PROV" />

    <fromview name="FORMS_V" alias="CLFO"/>

    <fromview name="FORMTYPES_V" alias="CFTY"/>

  </fromviews>

  <joins>

    <join  alias1="CLLI" col1="CLAI_ID" condition="="  alias2="CLAI"
col2="ID"/>

    <join  alias1="CLFO" col1="ID" condition="="  alias2="CFTY"
col2="CLFO_ID"/>

    <join  alias1="CFTY" col1="ID" condition="="  alias2="PROC"
col2="CFTY_ID"/>

    <leftouterjoin  alias1="PROV" col1="ID" condition="="  alias2="CLAI"
col2="PROVIDER_ID"/>

  </joins>

  <where>

    <condition alias1="CFTY" col1="CODE"  operator="="  string=""
number="" date= ""    />

  </where>

</functionalView>

Thanks,
Rajneesh

On Mon, 24 Feb 2020 at 13:39, Rajneesh Shukla <[email protected]>
wrote:

> Hi Mukul,
>
> Thanks for your reply.
>
> I am  working inside the database, it won't be possible.
>
> Oracle XML DB only supports XML Schema 1.0.
>
>
> Thanks,
>
> Rajneesh
>
> On Sat, 22 Feb 2020 at 11:27, Mukul Gandhi <[email protected]> wrote:
>
>> Hi Rajneesh,
>>     Within the XSD document you've attached, following is a XSD issue to
>> start with (using Xerces-J 2.12.1 as XSD validator),
>>
>> [Error] query1.xsd:3:67: s4s-att-not-allowed: Attribute 'maxOccurs'
>> cannot appear in element 'element'.
>> [Error] query1.xsd:3:67: s4s-att-not-allowed: Attribute 'minOccurs'
>> cannot appear in element 'element'.
>>
>> i.e, the following is not allowed by XSD language,
>>
>> <xs:schema attributeFormDefault="unqualified"
>> elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema
>> ">
>>
>>     <xs:element name="functionalView" maxOccurs="1" minOccurs="1">
>>     ...
>>
>> </xs:schema>
>>
>> Removing, maxOccurs="1" minOccurs="1" from above shown xs:element
>> declaration from your attached XSD document, makes your XSD document
>> correct (with both 1.0 and 1.1 versions of XSD language).
>>
>> Now coming to your question.
>> I think that, the issue you've mentioned can be solved using an XSD 1.1
>> <assert> instruction. I guess that, you can rewrite your XSD fragment to
>> following (I've only added an <assert>), to achieve what you've mentioned,
>>
>> <xs:element name="where" maxOccurs="1" minOccurs="0">
>>        <xs:complexType>
>>              <xs:sequence>
>>                    <xs:element name="condition" maxOccurs="unbounded"
>> minOccurs="1">
>>                          <xs:complexType>
>>                                <xs:simpleContent>
>>                                      <xs:extension base="xs:string">
>>                                             <xs:attribute
>> type="xs:string" name="alias1" use="required"/>
>>                                             <xs:attribute
>> type="xs:string" name="col1" use="required"/>
>>                                             <xs:attribute
>> type="xs:string" name="operator" use="required"/>
>>                                             <xs:attribute
>> type="xs:string" name="string" use="optional"/>
>>                                             <xs:attribute
>> type="xs:string" name="number" use="optional"/>
>>                                             <xs:attribute
>> type="xs:string" name="date" use="optional"/>
>>                                             <xs:assert
>> test="exists(@string | @number | @date)"/>
>>                                    </xs:extension>
>>                               </xs:simpleContent>
>>                          </xs:complexType>
>>                      </xs:element>
>>                 </xs:sequence>
>>          </xs:complexType>
>> </xs:element>
>>
>> I've not tested, the logic of <assert> I've mentioned above.
>>
>> Could be useful information to share that, you may use the full XPath 2.0
>> language, to write value of 'test' attribute of an <assert>. Also, 1 upto
>> any number of <assert> elements can be written as siblings in the XSD
>> document (all of the sibling <assert> elements, have to evaluate to true
>> for having the XML instance document valid).
>>
>> On Fri, Feb 21, 2020 at 11:16 PM Rajneesh Shukla <
>> [email protected]> wrote:
>>
>>> Hello All,
>>>
>>> I am new to XSD and XML and need to explore if there is option to make
>>> sure that any one attribute in a set of attributes within same element is
>>> required.
>>>
>>> Example:
>>>
>>>   <xs:element name="where" maxOccurs="1" minOccurs="0">
>>>           <xs:complexType>
>>>             <xs:sequence>
>>>               <xs:element name="condition" maxOccurs="unbounded"
>>> minOccurs="1">
>>>                 <xs:complexType>
>>>                   <xs:simpleContent>
>>>                     <xs:extension base="xs:string">
>>>                       <xs:attribute type="xs:string" name="alias1"
>>> use="required"/>
>>>                       <xs:attribute type="xs:string" name="col1"
>>> use="required"/>
>>>                       <xs:attribute type="xs:string" name="operator"
>>> use="required"/>
>>>                       <xs:attribute type="xs:string" name="string"
>>> use="optional"/>
>>>                       <xs:attribute type="xs:string" name="number"
>>> use="optional"/>
>>>                       <xs:attribute type="xs:string" name="date"
>>> use="optional"/>
>>>                     </xs:extension>
>>>                   </xs:simpleContent>
>>>                 </xs:complexType>
>>>               </xs:element>
>>>             </xs:sequence>
>>>           </xs:complexType>
>>>         </xs:element>
>>>
>>> Here I want to ensure that minimum one  attribute  in a set of 3
>>> attributes (mentioned as optional in above) are required. All can not be
>>> optional , however any one (can be more than one also) is required.
>>>
>>> Thanking you in anticipation !!!
>>>
>>> Attachment:
>>> Complete XSD file.
>>>
>>
>>
>>
>> --
>> Regards,
>> Mukul Gandhi
>>
>

--0000000000007bb9a2059f53a219
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Mukul,</div><div><br></div><div>One more help plea=
se:</div><div><br></div><div>Is it possible to impose required constraint a=
t value level?</div><div>for example in below xml, I wnt to make sure value=
 for alias1, coli1 and operator is always populated in condition element wi=
thin where element.</div><div><br></div><div>functionalView name=3D&quot;CL=
AIMS_FV&quot; =C2=A0description=3D&quot;Learning Purpose&quot;&gt;<br><br>=
=C2=A0 &lt;columns&gt;<br><br>=C2=A0 =C2=A0 &lt;column name=3D&quot;CLAI.CO=
DE&quot; =C2=A0 columnAlias=3D&quot;CODE&quot; =C2=A0description=3D&quot;Th=
e code of the claim&quot; /&gt;<br><br>=C2=A0 =C2=A0 &lt;column name=3D&quo=
t;CLLI.CODE&quot; =C2=A0 columnAlias=3D&quot;LINE_CODE&quot; =C2=A0descript=
ion=3D&quot;The code of the claim line&quot; /&gt;<br><br>=C2=A0 =C2=A0 &lt=
;column name=3D&quot;PROC.CODE&quot; =C2=A0 columnAlias=3D&quot;PROC_CODE&q=
uot; =C2=A0description=3D&quot;The code of the claim line procedure&quot; /=
&gt;<br><br>=C2=A0 &lt;/columns&gt;<br><br>=C2=A0 &lt;fromviews&gt;<br><br>=
=C2=A0 =C2=A0 &lt;fromview name=3D&quot;CLAIMS_V&quot; alias=3D&quot;CLAI&q=
uot; /&gt;<br><br>=C2=A0 =C2=A0 &lt;fromview name=3D&quot;LINES_V&quot; ali=
as=3D&quot;CLLI&quot; /&gt;<br><br>=C2=A0 =C2=A0 &lt;fromview name=3D&quot;=
PROC_V&quot; alias=3D&quot;PROC&quot; /&gt;<br><br>=C2=A0 =C2=A0 &lt;fromvi=
ew name=3D&quot;PROV_V&quot; alias=3D&quot;PROV&quot; /&gt;<br><br>=C2=A0 =
=C2=A0 &lt;fromview name=3D&quot;FORMS_V&quot; alias=3D&quot;CLFO&quot;/&gt=
;<br><br>=C2=A0 =C2=A0 &lt;fromview name=3D&quot;FORMTYPES_V&quot; alias=3D=
&quot;CFTY&quot;/&gt;<br><br>=C2=A0 &lt;/fromviews&gt;<br><br>=C2=A0 &lt;jo=
ins&gt;<br><br>=C2=A0 =C2=A0 &lt;join =C2=A0alias1=3D&quot;CLLI&quot; col1=
=3D&quot;CLAI_ID&quot; condition=3D&quot;=3D&quot; =C2=A0alias2=3D&quot;CLA=
I&quot; col2=3D&quot;ID&quot;/&gt;<br><br>=C2=A0 =C2=A0 &lt;join =C2=A0alia=
s1=3D&quot;CLFO&quot; col1=3D&quot;ID&quot; condition=3D&quot;=3D&quot; =C2=
=A0alias2=3D&quot;CFTY&quot; col2=3D&quot;CLFO_ID&quot;/&gt;<br><br>=C2=A0 =
=C2=A0 &lt;join =C2=A0alias1=3D&quot;CFTY&quot; col1=3D&quot;ID&quot; condi=
tion=3D&quot;=3D&quot; =C2=A0alias2=3D&quot;PROC&quot; col2=3D&quot;CFTY_ID=
&quot;/&gt;<br><br>=C2=A0 =C2=A0 &lt;leftouterjoin =C2=A0alias1=3D&quot;PRO=
V&quot; col1=3D&quot;ID&quot; condition=3D&quot;=3D&quot; =C2=A0alias2=3D&q=
uot;CLAI&quot; col2=3D&quot;PROVIDER_ID&quot;/&gt;<br><br>=C2=A0 &lt;/joins=
&gt;<br><br>=C2=A0 &lt;where&gt;<br><br>=C2=A0 =C2=A0 &lt;condition alias1=
=3D&quot;CFTY&quot; col1=3D&quot;CODE&quot; =C2=A0operator=3D&quot;=3D&quot=
; =C2=A0string=3D&quot;&quot; =C2=A0 number=3D&quot;&quot; date=3D &quot;&q=
uot; =C2=A0 =C2=A0/&gt;<br><br>=C2=A0 &lt;/where&gt;<br><br>&lt;/functional=
View&gt;</div><div><br></div><div>Thanks,</div><div>Rajneesh<br></div></div=
><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Mo=
n, 24 Feb 2020 at 13:39, Rajneesh Shukla &lt;<a href=3D"mailto:rajneeshshuk=
[email protected]">[email protected]</a>&gt; wrote:<br></div><blockquote =
class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px sol=
id rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div>Hi Mukul,</div>=
<div><br></div><div>Thanks for your reply.</div><div>
<p>I am=C2=A0 working inside the database, it won&#39;t be possible.</p><p>=
Oracle XML DB only supports XML Schema 1.0.</p><p><br></p><p>Thanks,</p><p>=
Rajneesh<br></p>

</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_=
attr">On Sat, 22 Feb 2020 at 11:27, Mukul Gandhi &lt;<a href=3D"mailto:gand=
[email protected]" target=3D"_blank">[email protected]</a>&gt; wrote:=
<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8=
ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr=
"><div dir=3D"ltr">Hi Rajneesh,=C2=A0<br></div>=C2=A0 =C2=A0 Within the XSD=
 document you&#39;ve attached, following is a XSD issue to start with (usin=
g Xerces-J 2.12.1 as XSD validator),<br><br>[Error] query1.xsd:3:67: s4s-at=
t-not-allowed: Attribute &#39;maxOccurs&#39; cannot appear in element &#39;=
element&#39;.<br>[Error] query1.xsd:3:67: s4s-att-not-allowed: Attribute &#=
39;minOccurs&#39; cannot appear in element &#39;element&#39;.<br><br>i.e, t=
he following is not allowed by XSD language,<br><br>&lt;xs:schema attribute=
FormDefault=3D&quot;unqualified&quot; elementFormDefault=3D&quot;qualified&=
quot; xmlns:xs=3D&quot;<a href=3D"http://www.w3.org/2001/XMLSchema" target=
=3D"_blank">http://www.w3.org/2001/XMLSchema</a>&quot;&gt;<br><br>=C2=A0 =
=C2=A0 &lt;xs:element name=3D&quot;functionalView&quot; maxOccurs=3D&quot;1=
&quot; minOccurs=3D&quot;1&quot;&gt;<br>=C2=A0 =C2=A0 ...<br><br>&lt;/xs:sc=
hema&gt;<br><br>Removing, maxOccurs=3D&quot;1&quot; minOccurs=3D&quot;1&quo=
t; from above shown xs:element declaration from your attached XSD document,=
 makes your XSD document correct (with both 1.0 and 1.1 versions of XSD lan=
guage).<br><br>Now coming to your question.<br>I think that, the issue you&=
#39;ve mentioned can be solved using an XSD 1.1 &lt;assert&gt; instruction.=
 I guess that, you can rewrite your XSD fragment to following (I&#39;ve onl=
y added an &lt;assert&gt;), to achieve what you&#39;ve mentioned,<br><br>&l=
t;xs:element name=3D&quot;where&quot; maxOccurs=3D&quot;1&quot; minOccurs=
=3D&quot;0&quot;&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;xs:complexType&gt;<b=
r>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;xs:sequence&gt;<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;xs=
:element name=3D&quot;condition&quot; maxOccurs=3D&quot;unbounded&quot; min=
Occurs=3D&quot;1&quot;&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;xs:complexType&gt;<br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;xs:simpleContent&gt;<br>=C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;xs:extension base=3D&quot;=
xs:string&quot;&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:attribute type=3D&quot;xs:string&quot; n=
ame=3D&quot;alias1&quot; use=3D&quot;required&quot;/&gt;<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:a=
ttribute type=3D&quot;xs:string&quot; name=3D&quot;col1&quot; use=3D&quot;r=
equired&quot;/&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:attribute type=3D&quot;xs:string&quot; n=
ame=3D&quot;operator&quot; use=3D&quot;required&quot;/&gt;<br>=C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:a=
ttribute type=3D&quot;xs:string&quot; name=3D&quot;string&quot; use=3D&quot=
;optional&quot;/&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:attribute type=3D&quot;xs:string&quo=
t; name=3D&quot;number&quot; use=3D&quot;optional&quot;/&gt;<br>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;x=
s:attribute type=3D&quot;xs:string&quot; name=3D&quot;date&quot; use=3D&quo=
t;optional&quot;/&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:assert test=3D&quot;exists(@string |=
 @number | @date)&quot;/&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0&lt;/xs:extension&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;/xs:=
simpleContent&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;/xs:complexType&gt;<br>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;/xs:e=
lement&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;/=
xs:sequence&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;/xs:complexType&gt=
;<div>&lt;/xs:element&gt;</div><div><br></div><div>I&#39;ve not tested, the=
 logic of &lt;assert&gt; I&#39;ve mentioned above.</div><div><br></div><div=
>Could be useful information to share that, you may use the full XPath 2.0 =
language, to write value of &#39;test&#39; attribute of an &lt;assert&gt;. =
Also, 1 upto any number of &lt;assert&gt; elements can be written as siblin=
gs in the XSD document (all of the sibling &lt;assert&gt; elements, have to=
 evaluate to true for having the XML instance document valid).</div><div><b=
r><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, =
Feb 21, 2020 at 11:16 PM Rajneesh Shukla &lt;<a href=3D"mailto:rajneeshshuk=
[email protected]" target=3D"_blank">[email protected]</a>&gt; wrote:<br>=
</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;b=
order-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">He=
llo All,<br><br>I am new to XSD and XML and need to explore if there is opt=
ion to make sure that any one attribute in a set of attributes within same =
element is required.<br><br>Example:<br><br>=C2=A0 &lt;xs:element name=3D&q=
uot;where&quot; maxOccurs=3D&quot;1&quot; minOccurs=3D&quot;0&quot;&gt;<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:complexType&gt;<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:sequence&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:element name=3D&quot;condition&quot; maxOcc=
urs=3D&quot;unbounded&quot; minOccurs=3D&quot;1&quot;&gt;<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:complexType&gt;<br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:simpleConten=
t&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 &lt;xs:extension base=3D&quot;xs:string&quot;&gt;<br>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:attribut=
e type=3D&quot;xs:string&quot; name=3D&quot;alias1&quot; use=3D&quot;requir=
ed&quot;/&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 &lt;xs:attribute type=3D&quot;xs:string&quot; name=3D&=
quot;col1&quot; use=3D&quot;required&quot;/&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:attribute type=
=3D&quot;xs:string&quot; name=3D&quot;operator&quot; use=3D&quot;required&q=
uot;/&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 &lt;xs:attribute type=3D&quot;xs:string&quot; name=3D&quot;s=
tring&quot; use=3D&quot;optional&quot;/&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:attribute type=3D&q=
uot;xs:string&quot; name=3D&quot;number&quot; use=3D&quot;optional&quot;/&g=
t;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 &lt;xs:attribute type=3D&quot;xs:string&quot; name=3D&quot;date&quo=
t; use=3D&quot;optional&quot;/&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;/xs:extension&gt;<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;/xs:simpleContent&gt;<=
br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;/xs:complexT=
ype&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;/xs:element=
&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;/xs:sequence&gt;<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;/xs:complexType&gt;<br>=C2=A0 =C2=A0=
 =C2=A0 =C2=A0 &lt;/xs:element&gt;<br><br><div>Here I want to ensure that m=
inimum one =C2=A0attribute =C2=A0in a set of 3 attributes (mentioned as opt=
ional in above) are required. All can not be optional , however any one (ca=
n be more than one also) is required.</div><div><br></div><div>Thanking you=
 in anticipation !!!<br></div><div><br></div><div>Attachment:</div><div>Com=
plete XSD file.</div></div></blockquote><div>=C2=A0</div></div><br clear=3D=
"all"><div><br></div>-- <br><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"l=
tr"><div dir=3D"ltr"><div>Regards,<br>Mukul Gandhi</div></div></div></div><=
/div></div></div>
</blockquote></div>
</blockquote></div>

--0000000000007bb9a2059f53a219--