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

Namespace qualified attributes?

From: Norman Walsh <ndw@nwalsh.com>
Date: 11 Oct 2000 15:15:49 -0400
To: xmlschema-dev@w3.org
Message-ID: <87bswrdw9m.fsf@nwalsh.com>
User error again, I assume?

Given this document:

<?xml version="1.0" encoding="iso-8859-1"?>
<publoc xmlns='http://www.w3.org/2000/xmlspec'
<loc xlink:type="simple" href="somehref">text</loc>

and this schema:

<!DOCTYPE schema SYSTEM "/share/doctypes/xmlschema/XMLSchema.dtd" [
<!ENTITY % schemaAttrs "
	xmlns:xsd	CDATA	#IMPLIED
	xmlns:spec	CDATA	#IMPLIED
	xmlns:xlink	CDATA	#IMPLIED
<schema xmlns='http://www.w3.org/2000/10/XMLSchema'

<attributeGroup name='common.att'>
  <attribute name='id' type='ID'/>
  <attribute name='role' type='NMTOKEN'/>

<complexType name='publoc' mixed='true'>
  <choice minOccurs='0' maxOccurs='unbounded'>
    <element ref='spec:loc'/>
  <attributeGroup ref='spec:common.att'/>

<complexType name='loc' mixed='true'>
    <extension base="string">
      <attributeGroup ref='spec:common.att'/>
      <attribute name='xlink:show' use='fixed' value='replace'/>
      <attribute name='xlink:type' use='fixed' value='simple'/>
      <attribute name='xlink:actuate' use='fixed' value='onRequest'/>
      <attribute name='href' use='required' type='string'/>

<element name='publoc' type='spec:publoc'/>
<element name='loc' type='spec:loc'/>


XSV complains:

attribute {http://www.w3.org/1999/xlink}:type

But it looks to me like I've declared it. And I can use the 'href' and
'id' attributes so it looks like xsv sees the complex type definition
and doesn't object to it.

What'd I do wrong this time? :-)

                                        Be seeing you,

Norman Walsh <ndw@nwalsh.com> | There is a great difference between
http://nwalsh.com/            | seeking how to raise a laugh from
                              | everything, and seeking in everything
                              | what may justly be laughed at.--Lord
                              | Shaftesbury
Received on Wednesday, 11 October 2000 15:18:06 UTC

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