W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2000

Question concerning use of substitutionGroup and xml:lang

From: Nik Klever <nik.klever@bitoek.uni-bayreuth.de>
Date: Mon, 23 Oct 2000 18:02:27 +0200
Message-ID: <39F46113.630EF987@bitoek.uni-bayreuth.de>
To: XML Schema Comments <www-xml-schema-comments@w3.org>
CC: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>

I've the following problem concerning the use of substitutionGroup and xml:lang:

to built one international schema I created the following elements:

 <xsd:element xml:lang="en" name="location" type="xsd:string"/>
 <xsd:element xml:lang="fr" name="localité" substitutionGroup="location"/>
 <xsd:element xml:lang="ge" name="Ort" substitutionGroup="location"/>

this works fine (as validated by Henry's excellent XSV-Tool) -
but if I want to use the following elements for different languages

 <xsd:element xml:lang="en" name="fax" type="xsd:string"/>
 <xsd:element xml:lang="fr" name="fax" substitutionGroup="fax"/>
 <xsd:element xml:lang="ge" name="Fax" substitutionGroup="fax"/>

I got the following - possibly correct - error-message from XSV:

<invalid char='2' code='cvc-identity-constraint.2.2.3' line='382' resource='file:/d:/xml/w3c/addresses.xsd'>duplicate key fax, first appearance was in unnamed entity at line 372 char 2 of file:/d:/xml/w3c/addresses.xsd</invalid>

because there are two elements with the same name, which is not allowed in a schema.

But how to build a procedure to extract a form using only the french part of the schema ? If the french "fax" element is not correct in the normal schema-context and it must be eliminated, how can I identify the french version ?

Do you have any suggestions ?


Nik

 
-- 
Nik Klever - University of Bayreuth - Computing Centre of the 
Bayreuth Institute for Terrestrial Ecosystem Research (BITOEK)
phone: +49 / 921 / 55-5720  fax:   +49 / 921 / 55-84-5720 
mailto:nik.klever@bitoek.uni-bayreuth.de 
http://www.bitoek.uni-bayreuth.de/~nik
Received on Monday, 23 October 2000 12:02:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:48 GMT