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

Re: XML Schemas: Best Practices

  • From: Eve.Maler@E... (Eve Maler - Sun Microsystems)
  • To: xml-dev@l...
  • Date: Thu, 12 Oct 2000 16:18:25 -0400

Re: XML Schemas: Best Practices
"Roger L. Costello" <costello@m...> wrote:
>Summary:
>
>"Here are guidelines for when to declare an item as an element versus
>when to define it as a type: during the lifespan of an item, if it is to
>be associated with multiple semantics then create a type definition. 
>If, on the other hand, the item's semantics are to remain constant over
>its lifetime, but multiple synonyms/aliases are to be used for the item
>then declare it as an element."
>
>Do you agree with these guidelines?  Perhaps these guidelines are too
>abstract?  If you were given these guidelines would you be able to make
>a decision on whether to define an item as an element or as a type?  Are
>there other things that you would add to the guidelines?  /Roger

I think it's not really right to suggest that different element names never 
add to the meaning of a type.  Clearly, the SydneyElevation element
declaration would add a layer of meaning to the Elevation type, even if the 
new layer doesn't result in tangible differences to the "signature" of the 
type (its content model or attribute list).  You can imagine both applications
that are interested in all things of type Elevation *and* applications that
are only interested in elevations in Sydney.

I would say that if an item has some core semantics on which it would be useful 
to layer different sets of additional semantics, you should use a named type --
but this is only because the particular design of XML Schema only allows you to do 
this layering with types and not with elements.

Elements are like "final" and "concrete" types because XML Schema does not 
allow them to be derived from and because they have a direct representation 
in instances.  But several schema language proposals over the last couple of 
years have done away with the element/type distinction, proving that they
have many semantic-ish characteristics in common.  (After all, SGML and XML
didn't have the distinction to begin with.)

	Eve


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.