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


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

I have an xml document like :


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

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


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

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 ?

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:06 UTC