OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Two quick questions regarding restriction in XML Schema

[ Lists Home | Date Index | Thread Index ]


a) You do not need to use xsi:type in the document if you derive the type
by restriction. In the schema you can simply associate the derived type
with an element.

However, if you want to implement alternative contents for the same
element, than you use the xsi:type which allows you to specify desirable
content in each document.



                    Murali Mani                                                                   
                    <mani@CS.UCLA        To:     <xml-dev@lists.xml.org>                          
                    .EDU>                cc:                                                      
                                         Subject:     [xml-dev] Two quick questions regarding     
                    17/05/02             restriction in XML Schema                                

I think these are related.. Can someone tell me --

a) If we derive types by restriction, do we have to use xsi:type in the
document? Is it true if I say that the document will be valid irrespective
of whether we use xsi:type or not .. We use xsi:type to know the "precise"

b) Is there any point in using block for restriction

thanks and regards - murali.

The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>

This e-mail is confidential.  If you are not the intended recipient, any use, disclosure or copying of this document is unauthorised and prohibited.  If you have received this document in error, please delete the email and notify me by return email or by phoning the NEMMCO Helpdesk on 1300 300 295.


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS