[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Two quick questions regarding restriction in XML Schema

  • To: "Nada Reinprecht" <Nada_Reinprecht@n...>,"Murali Mani" <mani@C...>
  • Subject: RE: Two quick questions regarding restriction in XML Schema
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Thu, 16 May 2002 19:38:37 -0700
  • Cc: <xml-dev@l...>
  • Thread-index: AcH9LiI7sKx4FtZuRoGPWSxzrISCNAAAauDw
  • Thread-topic: Two quick questions regarding restriction in XML Schema

block restriction
As for the question on using block for restriction which I assume means
using the block attribute on a complexType definition, the answer is
that you'd block restriction to prevent types derived by restriction
from replacing the content model of base types in an instance document. 
 
This is also described in the XML Schema Primer in
http://www.w3.org/TR/xmlschema-0/#ref28 

-- 
PITHY WORDS OF WISDOM 
Experience is something you don't get until just after you need it.
 
This posting is provided "AS IS" with no warranties, and confers no
rights. 
You assume all risk for your use. (c) 2002 Microsoft Corporation. All
rights reserved.



> -----Original Message-----
> From: Nada Reinprecht [mailto:Nada_Reinprecht@n...] 
> Sent: Thursday, May 16, 2002 4:04 PM
> To: Murali Mani
> Cc: xml-dev@l...
> Subject: Re:  Two quick questions regarding 
> restriction in XML Schema
> 
> 
> 
> Muralli,
> 
> 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.
> 
> Cheers,
> 
> </nada>
> 
> 
> 
>                                                               
>                                     
>                     Murali Mani                               
>                                     
>                     <mani@C...        To:     
> <xml-dev@l...>                          
>                     .EDU>                cc:                  
>                                     
>                                          Subject:     
>  Two quick questions regarding     
>                     17/05/02             restriction in XML 
> Schema                                
>                     02:42                                     
>                                     
>                                                               
>                                     
>                                                               
>                                     
> 
> 
> 
> 
> 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" type??
> 
> 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.

-----------------------------------------------------------------
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>


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.