W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2001

Re: Use of xml:lang in XML Schema

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 31 Jan 2001 16:47:33 +0000
To: "Martin Bryan" <mtbryan@sgml.u-net.com>
Cc: <xmlschema-dev@w3.org>
Message-ID: <f5b66ivhdne.fsf@cogsci.ed.ac.uk>
"Martin Bryan" <mtbryan@sgml.u-net.com> writes:

> I want to require a particular element in an XML Schema to be required to
> have an xml:lang attribute. I am not, however, sure a) whether or not I need
> to declare a separate xml namespace

No need, see other thread running at the moment!

> b) what URL I should assign that namespace

it must be http://www.w3.org/XML/1998/namespace

> c) whether or not there needs to be a formal declaration for the
> attribute in another schema fragment that should be imported/included into
> the referencing schema

Yes, but it already exists, and lives at the above URI, so you don't
have to do anything beyond importing it, e.g.

<xs:import namespace="http://www.w3.org/XML/1998/namespace"/>

<xs:complexType ...>
  <xs:attribute ref="xml:lang" use="required"/>

  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
Received on Wednesday, 31 January 2001 11:47:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:49 UTC