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

use of xml:lang

From: Guillaume Rousse <rousse@ccr.jussieu.fr>
Date: Fri, 23 Nov 2001 18:33:23 +0100
To: <xmlschema-dev@w3.org>
Message-Id: <20011123173323.779A25933@silbermann.snv.jussieu.fr>
country xml lang
I looking for a way to allow a textual element occurs several times with 
different xml:lang attribute values.

Something as (multiple <name> allowed for a <country>):
<country>
  <name>brazil</name>
  <name xml:lang="fr">brésil</name>
  <name xml:lang="es">brasil</name>
</country>
Or better (one only <name> allowed for a <country>):
<country>
  <name>
    <language>brazil</language>
    <language xml:lang="fr">brésil</language>
    <language xml:lang="es">brasil</language>
  </name>
</country>

I'm currently thinking of a key to ensure unicity, but is it not overkill ?
<key name="languageKey">
    <selector xpath="country/name"/>
    <field xpath="@xml:lang"/>
</key>
or
<key name="languageKey">
    <selector xpath="country/name/language"/>
    <field xpath="@xml:lang"/>
</key>
And i doubt it will allow a default value (without xml:lang attribute) in 
either case.

Am i missing something there ?
-- 
Guillaume Rousse <rousse@ccr.jussieu.fr>
GPG key http://lis.snv.jussieu.fr/~rousse/gpgkey.html
Received on Friday, 23 November 2001 12:33:59 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.