- From: Costello, Roger L. <costello@mitre.org>
- Date: Mon, 20 Jul 2009 19:37:47 -0400
- To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Thanks again Noah. I recast the slide as illustrating different use cases (and corrected my mistake of "assertions on elements"). Please let me know if this is reasonable (slide 28): 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: Monday, July 20, 2009 5:20 PM > To: Costello, Roger L. > Cc: xmlschema-dev@w3.org; xmlschema-dev-request@w3.org > Subject: RE: ANN: XML Schema 1.1 Tutorial > > Thank you for taking these concerns to heart. > > p 28: Well, it's all up to you, but I still think you are > conflating types > with elements on slide 28, and in a tutorial that seems > unfortunate. My > mail showed an example with two elements, <width> and > <height>. Also, I > think calling it "two schools of thought" is a bit misleading > and sets up > unnecessary controversy. I think there are tradeoffs and > different use > cases. When you want to optimize something like business rules for a > particular document type, or for a major subsection of a > document, than I > think putting the assertions on the type of the document root > or the root > element of the subtree makes sense. In general, when you > want to have > reusable types, then it is appropriate to include in those types > assertions appropriate to the correct use of that type, > insofar as XSD 1.1 > can express them. Those aren't so much conflicting philosophies as > differing use cases, IMO. > > p 232: there's a typo, perhaps carried from my original: > "BigDecimal or > similar type " -> "BigDecimal or similar types " > > Thanks! > > 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/18/2009 07:45 AM > > To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org> > cc: (bcc: Noah Mendelsohn/Cambridge/IBM) > Subject: RE: ANN: XML Schema 1.1 Tutorial > > > > 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 Monday, 20 July 2009 23:38:22 UTC