[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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
names according to date

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 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.