Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are the type system represented by XmlSchema and the CLS isomorphic

Can someone please explain this question to me?

Are the type system represented by XmlSchema and the CLS isomorphic?

Link

like image 573
Maxim Gershkovich Avatar asked Apr 13 '11 12:04

Maxim Gershkovich


2 Answers

Means every type defined by XML Schema can be defined in CLS (.NET type system) and vice versa.

For example, if we have xs:string in XML Schema, we have System.String in .NET. And If I define this class in C#:

public class Foo
{
   public string Bar{get;set;}
}

I can represent that in XML Schema:

<xs:complexType name="Foo">
    <xs:sequence>
      <xs:element name="Bar" type="xs:string" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
</xs:complexType>
like image 78
Aliostad Avatar answered Oct 20 '22 00:10

Aliostad


NO.

the question is a fancy way of asking if each member in the CLS has corresponding one in XmlSchema.

There are a lot of matches but mismatches as well so the answer is no - they are not isomorphic.

like image 37
Manoj Das Avatar answered Oct 20 '22 00:10

Manoj Das