[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: W3C Schema: Resistance is Futile, says Don Box
[bryan] > Finally the fact that .Net users use it all the time; does this apply to > Schemas that they generate for instance documents - forgive me here I > seem to remember seeing a schema generator for VS.Net sometime, as I > just use the Framework I'm unfamiliar with the functionalities of VS.Net > - does it apply to Schemas that others have written, or does it apply to > Schemas that they themselves author? I submit that if it applies to the > second then the "accounting" for development time could be screwed up > without accurate measurement of time taken to write the schema, which I > bet could have been more quickly written in another language. Here's how it works in .NET, including .NET Studio. The xml schema is basically invisible to the programmer. Say you want to provide a "Web Service". You start a new Web Services form in .NET Studio and define the classes that will respond the the service requests. Being .Net, you can use C++, C#, VB, ... When you compile everything, .NET creates a WSDL service description, which includes an xml schema that describes the data types for the input and output. This happens behind the scenes; the user does not write the schema nor select the translation to xsd data types. To access to service, you create, in .NET Studio, a form which is more or less a web page with Microsoft extensions for server-side processing (which are added by the .NET machinery, not by the programmer). You tell it to use your web service. When you compile, behind the scenes .NET refers to the wsdl file, reads the embedded schema in that file, and creates corresponding classes to turn a request instance into parameters of the corresponding data types and pass them to the code that does the service. IIRC, it also generates code that checks the received parameters to see that they are the right type. You can also start with a wsdl file that you create outside of .NET. That sometimes does not work - for example, if you use a urn: scheme instead of an http: scheme for the target namespace, it gets rejected by the machinery (I can't imagine why), but I think that normally it does work. So you can see that .NET provides roundtripping translation of normal programming data types, and uses schemas, while the user does not see or touch schemas, wsdl, or even xml. If you do want to do part of this by hand, for example to connect to a service that was not created by .NET, it may work but if it doesn't fit the scenarios that MS has provided for, it may not. Cheers, Tom P
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|