OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Fun With Schemas

[ Lists Home | Date Index | Thread Index ]

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. ;-}

Bob Foster

Bullard, Claude L (Len) wrote:
 > This one is fun.  I know that a validating editor
 > can use a schema or DTD to create a valid file.
 > Can a program do this for files it creates dynamically?
 > Are there examples of this?
 > This question came from a programmer who doesn't want
 > to hardwire the structure of files she creates into
 > the code that creates them.  I had replied with validation
 > on input (create the file, validate it then), and what
 > she actually wants to do is use the schema to drive
 > the file builder using say, SAX or its analog.  Mainly,
 > she doesn't want to rewrite the code when new versions
 > of the document inevitably occurs.  She just wants to
 > modify the schema.  Works for editors but of course,
 > they run in human time, but other than performance, I
 > can't think of a reason WHY she couldn't do it.
 > What about it?
 > len

  • References:


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS