ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
Re: XML read/write using schemas - Consultancy?
by Robin Berjon other posts by this author
Aug 26 2009 10:11AM messages near this date
view in the new Beta List Site
Re: XML read/write using schemas - Consultancy? | Re: XML read/write using schemas - Consultancy?
& XSLT On Aug 26, 2009, at 17:34 , Michael Ludwig wrote:
>  Oliver Elphick schrieb:
> > On Wed, 2009-08-26 at 00:26 +0200, Michael Ludwig wrote:
> >> use the schemas to validate input and output? Or something else?
> >
> > Is that the only point of the schema? I have found the routines that
> > validate an XML message against a schema.
> 
>  Yes, a schema is for typing and validation. I'm unaware of other  
>  reasons
>  for using a schema.

Actually a schema is a description of a language, and as such you can  
use it for bunch of things. Naturally, the basic usage is indeed  
validation, and in some cases it makes sense to use a schema for  
typing. But that does not preclude other things. For instance one  
could use a schema to generate documentation, or to provide guidance  
in an XML editor.

The usage that Oliver was thinking of is data binding, whereby one  
uses a schema to generate some form of programmatic interface to the  
data (oftentimes classes) that allows for easy mapping between objects  
that are natural in the language and XML. That being said most data  
binding approaches have limitations, and in my experience they tend to  
be useful mostly if the schema is really complex. For most simple  
cases, one can do without them.

Of course, most of the time having a schema is fairly useless to start  
with :)

-- 
Robin Berjon - http://berjon.com/



_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Oliver Elphick
Dave Howorth
Robin Berjon
Michael Ludwig
Oliver Elphick
Michael Ludwig
Robin Berjon
Oliver Elphick
Petr Pajas
Dave Howorth

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved