- From: Costello, Roger L. <costello@mitre.org>
- Date: Sat, 18 Jul 2009 07:45:17 -0400
- To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Thanks Noah! Excellent suggestions. I've incorporated them (see slide 28 and slide 232): http://www.xfront.com/xml-schema-1-1/xml-schema-1-1.ppt /Roger > -----Original Message----- > From: noah_mendelsohn@us.ibm.com [mailto:noah_mendelsohn@us.ibm.com] > Sent: Friday, July 17, 2009 2:53 PM > To: Costello, Roger L. > Cc: xmlschema-dev@w3.org > Subject: Re: ANN: XML Schema 1.1 Tutorial > > Roger: overall, I think this is excellent. A very impressive > piece of > work. One disagreement and one suggestion: > > * Disagreement: > > You suggest: > > "Due to the restrictions on what the XPath can reference, I > recommend all > assertions be placed on the document's root element. " > > First of all, assertions go on types, not elements, but > that's not my main > concern as your intention is clear. I just think this is not > in general > good advice, because it undermines the value of assertions on > types that > are usable across documents. Let's say I have some type, > perhaps for a > measurement that was taken repeatedly. An element of that > type might look > like: > > <width minMeasurement="3.02" maxMeasurement="3.06" > meanMeasurement="3.04" /> > > or, in the same document: > > <height minMeasurement="4.3" maxMeasurement="5.2" > meanMeasurement="4.8" /> > > Let's assume these elements are both of complexType measurementType. > > Very possibly, I'd want to <assert> that minMeasurement <= > meanMeasurement > <= maxMeasurement. Why would I want to do that at the > document level? > Presumably, measurements like this could be used in lots of > documents and > on lots of differently named elements. For this case, the assertion > belongs on measurementType, I think. The same might well be > true of an > address type, which could check that the first two digits of > a zip code > are consistent with the name of the state. Indeed, there are > many, many > common examples in which you don't want to hoist assertions > to the root, > IMO. Reuse of these things is important! > > * Suggestion: in your discussion of precisionDecimal, you > might indicate > that one of the reasons it has been added is that it embodies > XML support > for the recently adopted IEEE 754-2008 standard for floating point > decimal. Java BigDecimal or similar type in other > programming languages > are examples of implementations of IEEE 754-2008, just as > Java double and > float are implementations if IEEE 754 floating point binary. > The new XSD > precisionDecimal type supports the use case where you have > data in your > program that is represented using such a type, and want to > serialize it > and validate in in XML, while preserving the 754-2008 semantics (e.g. > precision matters). > > Noah > > > > -------------------------------------- > Noah Mendelsohn > IBM Corporation > One Rogers Street > Cambridge, MA 02142 > 1-617-693-4036 > -------------------------------------- > > > > > > > > > "Costello, Roger L." <costello@mitre.org> > Sent by: xmlschema-dev-request@w3.org > 07/17/2009 01:37 PM > > To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org> > cc: (bcc: Noah Mendelsohn/Cambridge/IBM) > Subject: ANN: XML Schema 1.1 Tutorial > > > > Hi Folks, > > I created a tutorial on XML Schema 1.1: > > http://www.xfront.com/xml-schema-1-1/xml-schema-1-1.ppt > > > I am announcing it here before announcing it on xml-dev. > > I am eager to get your feedback on: > > 1. Are there any mistakes in it? > > 2. Is it clear? Is it easy to understand? > > 3. Have I missed any of the new functionality? > > > I would like to especially thank Michael Kay and Michael > Sperberg-McQueen > for their patience in answering my endless questions. > > /Roger > > >
Received on Saturday, 18 July 2009 11:45:55 UTC