Dynamically defining elements names according to id attributes

Hi,

I'm new to XML Schema but considering the switch for DTDs because of
the following issue.

I have an xml document like :

<i18n>

   <languages>
     <lang id="en">
       <name> english </name>
     </lang>
     <lang id="fr">
       <name> french </name>
     </lang>
   </languages>

   <translations>
     <string key="hello">
       <en> Hi </en>
       <fr> Bonjour </fr>
     </string>
   </translations>

</i18n>

What I want is to "dynamically" define <en> and <fr> as related to the lang's id
attribute.

That is : if one adds a <lang id="it">  statement to the <languages> section,
it would then become allowed to use <it> elements inside of <string>.

Is that possible with XML Schema ?

--
   og

Received on Friday, 29 October 2004 12:04:12 UTC