[
Lists Home |
Date Index |
Thread Index
]
Yes, I was surprised at your previous email, I was debating between my
confidence vs your answer, when you sent me this.. :)
I am working on that report right now..
can I point you to http://www.cs.williams.edu/~kim/FOOLbook.html -- this
seems very good for understanding the concepts such as subtyping as is
done in different Programming Languages..
cheers - murali.
On Wed, 22 May 2002, Dare Obasanjo wrote:
> Ackkkk. I meant the latter.
>
> *sigh*
>
> Need my morning caffeine.
>
> --
> PITHY WORDS OF WISDOM
> In a fight between you and the world-bet on the world.
>
> 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: Dare Obasanjo [mailto:dareo@microsoft.com]
> > Sent: Wednesday, May 22, 2002 11:00 AM
> > To: Murali Mani; Nada Reinprecht
> > Cc: xml-dev@lists.xml.org
> > Subject: RE: [xml-dev] Two quick questions regarding
> > restriction in XML Schema
> >
> >
> > It is the former. I think he was stating that you could have done
> >
> > <element name="book" type="Book1">
> >
> > in the schema instead of using xsi:type in the instance document.
> >
> > --
> > PITHY WORDS OF WISDOM
> > In a fight between you and the world-bet on the world.
> >
> > 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: Murali Mani [mailto:mani@CS.UCLA.EDU]
> > > Sent: Thursday, May 16, 2002 7:07 PM
> > > To: Nada Reinprecht
> > > Cc: xml-dev@lists.xml.org
> > > Subject: Re: [xml-dev] Two quick questions regarding
> > > restriction in XML Schema
> > >
> > >
> > >
> > > Can I ask an example,
> > >
> > > suppose we defined
> > >
> > > type Book -> (Title, Author*)
> > > type Book1 restricts Book -> (Title, Author, Author)
> > >
> > > (in other words, Book1 is for Books with exactly two Authors)
> > >
> > > Now suppose we declare an element as
> > >
> > > <element book type="Book">
> > >
> > > and in the document however we want to use type Book1, how do
> > > we say that?
> > >
> > > Do we say
> > > <book>
> > > <title>XYZ</title>
> > > <author>ABC</author>
> > > <author>DEF</author>
> > > </book>
> > >
> > > or do we say
> > > <book xsi:type="Book1">
> > > <title>XYZ</title>
> > > <author>ABC</author>
> > > <author>DEF</author>
> > > </book>
> > >
> > > I think it should be the latter? But Nada, I think you say it
> > > is the former?
> > >
> > > thanks and regards - murali.
> > >
> > > On Fri, 17 May 2002, Nada Reinprecht wrote:
> > >
> > > >
> > > > 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>
> > > >
> > > > 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>
> >
> >
> > -----------------------------------------------------------------
> > 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>
> >
> >
>
> -----------------------------------------------------------------
> 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>
>
|