[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML Schema: "Best used with the ______ tool"

  • From: Dennis Sosnoski <dms@s...>
  • To: xml-dev@l...
  • Date: Fri, 28 Nov 2008 23:29:08 +1300

Re:  XML Schema: "Best used with the ______ tool"
Michael Kay wrote:
>> ...
>> Are we in a similar situation today with XML Schema tools? 
>> When you create an XML Schema will you inform your clients:
>>
>>     
>
> As far as schema tools used to perform validation are concerned, I think the
> level of interoperability is quite high. There are a few edge cases where
> you find variations, but they don't cause that many problems in practice.
> What I think you are seeing is problems with data binding tools. These are
> performing a mapping from constructs in XML Schema to constructs in some
> other type system. These mappings are far less governed by standards, and
> it's generally not surprising if there are some constructs in XML Schema
> that don't cleanly map to some other chosen type system, and that therefore
> can't be used with the tool in question.
>
> The best answer is to do everything using XML-based processing languages
> (XSLT and XQuery) rather than spending 75% of your programming effort
> converting your data between one type system and another.
>   

Wonderful answer for those who don't have any performance concerns and 
are more comfortable working in XML than in data structures. The web 
services world, however, is generally quite concerned about both 
performance and ease of use for programmers, and because of these issues 
data binding is used for the vast majority of web services.

Unfortunately there is a real disconnect between XML schema and 
programming language data structures, and most of the people in the SOA 
community who are pushing schema for web services don't seem to 
understand that. I personally think it's better to start from code and 
use data binding tools that allow clean schema generation, since the 
schema generated by one data binding tool will generally be usable with 
other tools of the same type. But too many people have been sold on 
"schema first" approaches, and when they actually start using their 
schema in real applications they're shocked to discover that, e.g., 
pretty much all of their lovingly-crafted simpleType restrictions are 
ignored in the programming API and the base datatype is just used instead.

That doesn't make schemas useless with web services, of course, even if 
they have more detail than is represented in the data binding 
representation. You can still use schema validation during testing, for 
instance. But if your focus is on web services you should design your 
schemas with data binding in mind.

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.