Freigeben über


Why WinFS schema are not XSD schema , IMHO.

After Dare set me straight with XML, I have been browsing his posts, where I came across this: https://www.25hoursaday.com/weblog/PermaLink.aspx?guid=d0b398f5-9343-4f91-8e1c-340c5a6669e2 . I was especially interested in this post because it involved WinFS schema in the Longhorn SDK, which is a topic I have explored in some depth.

WinFS defines a unique XML grammar for describing its schema. WinFS schemas are not equivalent to the widely accepted W3C standards body’s XML Schema (XSD).

There seem to be a few reasons for this that mostly mirror Dare's post:

  1. XSD’s scalar type set is not easily mapped to the SQL and CLR scalar type set used in WinFS. For example:
WinFS Scalars XSD Scalars
Boolean boolean
String string
Binary decimal
Byte float
Int16 double
Int32 duration
Int64 dateTime
Single time
Double date
Decimal gYearMonth
DateTime gYear
Guid gMonthDay
Xml gDay
  gMonth
  hexBinary
  base64Binary
  anyURI
  QName
  NOTATION

A problem arises at the very beginning when you try to map the WinFS Boolean to the XSD boolean. A WinFS Boolean can be nullable, while a XSD boolean can only be true or false.

  1. There are a number of XSD constructs which have no equivalent in WinFS, such as global element declarations.
  2. There are a number of WinFS constructs which have no equivalent in XSD. WinFS relationships, for example, cannot be expressed in XSD.

Note that you can describe WinFS Schema using XSD and WinFS can store XML documents and fragments (as can SQL Server Yukon Beta1). It seems that you gain a grammar capable of expressing WinFS schema, but loose some tool support, since current tools only supports XSD.

Comments

  • Anonymous
    April 28, 2004
    The comment has been removed