A question on element default values

I am a schema-newbie. In my current project, I am facing in a problem with
schema upgrades. In detail, it is like the following:
>From my application, I can store the configuration data as an XML file into
the non-volatile memory. It follows the representation set forth by a
schema. In time, the schema could get modified and new elements etc could be
added. If the application is using a newer version of the schema than the
XML file on disk (ie the application needs more elements than that is
present in the old XML file), is there a way to provide some default values
for the new fields from the schema itself? I understand that missing
optional attributes can be initialized with default values as given in the
schema itself, whereas for elements, the schema definition requires that the
element itself to be present in order to use the default value from the
schema. In the case I described, the elements themselves will be absent.

Has anyone encountered such a scenario before? Is there a work-around to
this solution using the schema structures themselves? Any input will be much
appreciated. I searched the archive, but could not find any description of a
similar situation.

Thanks in advance,
Sreeni Nair

-- 
"We don't check for NULL."

Received on Friday, 15 September 2006 16:19:25 UTC