W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2004

Dynamically defining elements names according to id attributes

From: Olivier Guilyardi <ml@xung.org>
Date: Fri, 29 Oct 2004 14:01:20 +0200
Message-ID: <41823110.2060708@xung.org>
To: xmlschema-dev@w3.org

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

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:11 UTC