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

Re: XML Schemas: Best Practices

  • From: "Roger L. Costello" <costello@m...>
  • To: xml-dev@l...
  • Date: Fri, 12 Jan 2001 08:28:28 -0500

complextype abstract
Curt Arnold wrote:

> I always fall back on making some parallels with OOP concepts.

Your last message is very interesting Curt.  It made me realize that we 
have fundamentally different mapping sets in our minds, which accounts 
for why we differ on some issues. This may be worth exploring
further as it may have implications on how to design XML Schemas.

In Curt's last message he revealed how he thinks of the various schema
components in terms of how they map to Object Oriented Programming 
(OOP) components:

Curt

Schema Component                OOP Analogue
----------------------------------------------
complexType                     abstract class
global element (schema scope)   class
local element (type scope)      inner class

As a consequence of this mental framework, Curt argues for certain
design practices.  For example, he argues against using type scoped
elements as a default, just as he wouldn't use inner classes as a 
regular practice.  Instead he encourages the use of schema scoped
elements, just as would encourage use of classes in OOP.  Given this 
mental framework, I can now understand his approach to certain design 
issues.

On the other hand, I have a different mapping:

Roger

Schema Component                OOP Analogue
----------------------------------------------
abstract complexType            abstract class
complexType                     class
simpleType                      primitive type
abstract element                ???
global element (schema scope)   global variable
local element (type scope)      local variable

In my mental framework, it makes good sense to minimize the use of
global elements, just as in OOP I want to minimize the use of 
global variables.  And, in my model it makes good sense to maximize
the use of type scoped elements, just like in OOP I use mostly local
variables.  In my last message I advocated separating the global
elements into a private schema, and the type definitions into separate,
public schema.  In OOP, this is analogous to making the classes public
and the global variables private.

Until this point in time, it never occurred to me that there was another
mental model.  I am thankful to Curt for shaking me out of my narrow
thinking, and awakening me to other points of view.  I don't know 
which model is "correct" (is there such a thing?)  What model do you 
have?  /Roger


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.