Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 59206 invoked from network); 16 Mar 2004 22:41:26 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 16 Mar 2004 22:41:26 -0000 Received: (qmail 74703 invoked by uid 500); 16 Mar 2004 22:41:03 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 74694 invoked by uid 500); 16 Mar 2004 22:41:02 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 74685 invoked from network); 16 Mar 2004 22:41:02 -0000 Received: from unknown (HELO mclean-vscan3.bah.com) (156.80.3.63) by daedalus.apache.org with SMTP; 16 Mar 2004 22:41:02 -0000 Received: from mclean-vscan3.bah.com (mclean-vscan3.bah.com [156.80.3.63]) by mclean-vscan3.bah.com (8.11.0/8.11.0) with SMTP id i2GMf6P29501 for ; Tue, 16 Mar 2004 17:41:06 -0500 (EST) Received: from mclean6-mail.usae.bah.com ([156.80.5.102]) by mclean-vscan3.bah.com (NAVGW 2.5.2.12) with SMTP id M2004031617410604491 for ; Tue, 16 Mar 2004 17:41:06 -0500 Received: from jandersont40 ([192.168.130.184]) by mclean6-mail.usae.bah.com (Netscape Messaging Server 4.15) with ESMTP id HUOXOK00.98R for ; Tue, 16 Mar 2004 17:41:08 -0500 From: "Anderson Jonathan" To: Subject: RE: Doc/Literal support in axis Date: Tue, 16 Mar 2004 17:41:05 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <40577FC7.7040702@sosnoski.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Reading that Dennis, I actually think we're in the same camp. :) Thanks for taking the time to re-illustrate your position (I missed it in earlier threads). I have NEVER understood why XML Schema went as far as it did - extending simpleTypes to restrict values based on regular expressions seems to me to be out of the scope of a type system. Given that not many Schema -> OO type mapping tools currently even support XML Schema to that level, we typically stick with plain-jane complexType, element, and attribute declarations. So far it's proven a safe strategy for WSDL2xxxx toolkit iterops. Maybe we'll see an XML Schema "Lite" in the future? -Jon -----Original Message----- From: Dennis Sosnoski [mailto:dms@sosnoski.com] Sent: Tuesday, March 16, 2004 5:29 PM To: axis-user@ws.apache.org Subject: Re: Doc/Literal support in axis Anderson Jonathan wrote: >... >The $5000 Question: >Should we not have native support in a programming language for XML Schema? >Why all this mapping nonsense? > That appears to be the "bold new computing direction" of the month for Microsoft. I think it's a bad idea. Schema is a design-by-committee monstrosity that makes the old Ada programming language look clean by comparison, combining the worst features of SQL and VB. Why would anyone want to bake it into a programming language? > >To quote another colleague of mine: "the W3C really created a monster with >XML Schema. It's far more powerful and expressive than most OO type systems >like C# or Java." > Schema does a decent job of letting you define XML structures. It also has a fairly nasty hodgepodge of types that, while awkward, at least allow you to express the intent of what you want to see in different components of your XML. Then it adds a truly bizzare set of ways to get down to the detailed level of what each component should be - things like the multitude of facets, regular expression matching, extensions of restrictions and restrictions of extensions, etc. What makes the latter set of detailed data descriptions of little use in practice is that there's no way to condition the values permitted for one attribute or element on the values (or even presence or absence) of another attribute or element. Sure, you can do really complex descriptions of simple text values in schema - there's a 100-page ISBN number schema I use as a look-at-that example in training classes, for instance - but why would you want to? For real applications schema validation is going to be prohibitively expensive once you get into the complex rules, and most applications require more intelligent data validation than schema can support anyway. My recommendation for anyone writing schemas is to use it for structure and basic data types, but stay away from the facets and such unless you really have a need to use them for descriptive purposes... and then don't write your program on the assumption that the facets will be enforced, for two reasons: (1) if someone changes the schema your code will break, and (2) schema validation will probably be turned off when you're deployed. - Dennis Dennis M. Sosnoski Enterprise Java, XML, and Web Services Training and Development Support http://www.sosnoski.com Redmond, WA 425.885.7197