Re: Choice between complextContent and complexType

Karl Stubsjoen <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
Thanks for the followup on this Mukul.

On Thu, Jun 16, 2011 at 1:30 AM, Mukul Gandhi <[email protected]> wrote:
> On Thu, Jun 16, 2011 at 9:10 AM, Mukul Gandhi <[email protected]> wrote:
>>    <xs:complexType name="EXT_formInputTypes">
>>          <xs:complexContent>
>>                <xs:extension base="formInputTypes">
>>                      <xs:attribute name="isExt" type="xs:boolean" default="1"/>
>>                </xs:extension>
>>          </xs:complexContent>
>>    </xs:complexType>
>
> There's a slight correction I would suggest for the above schema
> fragment I wrote.
>
> default="1" on xs:attribute won't work I think, since the
> xs:alternative has to know the attribute (and it's value) from the
> instance document, and then it'll select the type if the corresponding
> XPath predicate is true.
>
> Therefore for both the xs:alternative cases I suggested, the attribute
> "isExt" should be present in the instance document (with values 1/true
> or 0/false) for the example I suggested to work correctly.
>
> I hope this is correct.
>
>
>
>
> --
> Regards,
> Mukul Gandhi
>



-- 
Karl Stubsjoen
MeetScoresOnline.com
(602) 845-0006
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.