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

Re: XML Schemas: Best Practices

  • From: Ronald Bourret <rpbourret@r...>
  • To: xml-dev@l...
  • Date: Thu, 19 Oct 2000 09:34:09 -0700

best practices and xml programming


Jon Cleaver wrote:
>
> There appears to be a convergence of thought that the design of an XML
> schema is somewhat analogous to the creation of an Object Oriented Design
> for a piece of code. There are instances where you want to maximise
> component reuse and instances where you want data to be private. There are
> also instances where you want to combine both of these.

While I do see the similarities, there also seems to be one big
difference. In OO design, you can hide data inside an object and tell
everybody else that they can't see it. In XML, the data is in full view,
even if the element type definitions are local. All of which makes me
wonder why XML Schemas defined local element types in the first place.

Except for namespace hiding (which I hadn't thought of), the only
application I could see was a direct mapping of Java classes to XML
Schemas -- local element types would solve the problem of two different
classes having properties of the same name without having to resort to
per-class namespaces.

(As an aside, this is, IMHO, exactly why namespaces turned out to be so
hard. In programming languages, you have many levels of "local", and a
compiler can decorate names to ensure global uniqueness. All very nice
and hidden from a programmer. In XML, everything is in full view and the
schema author has to do the decoration manually.)

-- 
Ronald Bourret
Programming, Writing, and Training
XML, Databases, and Schemas
http://www.rpbourret.com

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.