W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2000

RE: Problem with qualified namespaces and xsv

From: David E. Cleary <davec@progress.com>
Date: Tue, 7 Nov 2000 16:01:27 -0500
To: "Eric van der Vlist" <vdv@dyomedea.com>, <xmlschema-dev@w3.org>
Message-ID: <NDBBIOBPAGDGFJAHFCGGIEAICEAA.davec@progress.com>
> works fine (I can reference a xml:lang attribute), while:
>
> <xsd:schema
>     xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
> 	xmlns:xml="http://www.w3.org/XML/1998/namespace"
> 	targetNamespace='http://www.w3.org/XML/1998/namespace'
> 	attributeFormDefault="unqualified">
>
> 	<xsd:attribute name="xml:lang" type="xsd:language"/>
>
> </xsd:schema>
>
> gives you an error:

This is correct. You do not declare qualified element names and attribute
names this way. Try this, using the <import> funtion.

<xsd:schema
    xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
	xmlns:xml="http://www.w3.org/XML/1998/namespace"
	targetNamespace='http://www.w3.org/XML/1998/namespace'
	attributeFormDefault="unqualified">

	<import namespace="http://www.w3.org/XML/1998/namespace"
         schemaLocation="http://www.w3.org/2000/10/xml.xsd">
	</import>

</xsd:schema>

You can then add references to xml:lang on you complex type definitions.

David Cleary
Progress Software
Received on Tuesday, 7 November 2000 16:07:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:18 GMT