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

Re: Fun With Schemas


fun.re
On Mon, 14 Mar 2005 15:02:24 -0800, Bob Foster <bob@o...> wrote:
> Generating instances from schemas usually just produces one of the
> infinite number of instances restricted by certain trivial parameters. I
> don't know of an example where meaningful instances are generated.
> 
> If a generated document changes automatically depending on the schema it
> finds at the time of generation yet somehow contains the same
> "information", there must be a model of the document that is independent
> of the schema, e.g., something like an ER model. Then the model must be
> populated: this concrete entity has that relationship to these other
> concrete entities, etc. Then there must be a mapping from the abstract
> document model to the elements and attributes used in the schema. When
> the schema changes, the mapping must change in concert (and there must
> be a way to prevent changes to the schema that violate the abstract
> document model, e.g., changing an unbounded relationship to a bounded one).
> 
> After that, piece of cake. ;-}

Instance traversal is something I didn't touch on but of course is the
real issue here: what's the data source?  I had assumed the
application would be traversing some form of relational DB or similar
and that there was already some natural key structure and 
relationship metadata/data around.  Not necessarily a good
assumption...

If not, you need some source of control over the data source or
complete metadata.  If the data is simple and you control it you can
just add id/idref pairs to it to get simple hierarchical descent
traversal.  But if the data's that easy to walk then I'm not sure why
you're doing this.

Beyond that you can make some simplifying assumptions.  The easiest is
something like assuming every element contains an attribute with the
same name plus something like "Id" appended and that every referring
element will include an identically named attribute. That will get you
lattice like graph traversal and many to many relationships. However,
unless this is also enforced on the data population side it sounds
rather fragile...  Then again, we do know you have a Schema that can
be checked at data population time :-)

<snip/>

-- 
Peter Hunsberger

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.