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

key/keyref and namespaces.

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Tue, 17 Oct 2000 11:41:20 +0200
Message-ID: <39EC1EC0.ACDE74A9@dyomedea.com>
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Hi,

Is there any reason why key/keyrefs should be affected by namespaces ?

XSV fails to detect a error when key/keyrefs defined as:

<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
    xmlns:rss="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	targetNamespace='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
	elementFormDefault="qualified"
	attributeFormDefault="qualified"
>

<xsd:import namespace="http://purl.org/rss/1.0/"
	schemaLocation="rss-core.xsd"/>

.../...
<xsd:element name="RDF">
	<xsd:complexType content="elementOnly">
	<xsd:sequence>
		<xsd:element ref="rss:channel"   minOccurs="1" maxOccurs="1"/>
		<xsd:element ref="rss:image"     minOccurs="0" maxOccurs="1"/>
		<xsd:element ref="rss:item"      minOccurs="1" maxOccurs="unbounded"/>
		<xsd:element ref="rss:textinput" minOccurs="0" maxOccurs="1"/>
	</xsd:sequence>
	</xsd:complexType>
	
	<xsd:key name="imageKey">
		<xsd:selector xpath="rss:image"/>
		<xsd:field xpath="@rdf:about"/>
	</xsd:key>

	<xsd:keyref refer="imageKey" name="imageKeyref">
		<xsd:selector xpath="rss:channel/rss:image"/>
		<xsd:field xpath="@rdf:resource"/>
	</xsd:keyref>

</xsd:element>
...

do not match.

Thanks

Eric
-- 
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
------------------------------------------------------------------------
Received on Tuesday, 17 October 2000 05:40:41 UTC

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