W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2003

Re: XLink attributes in a Schema

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: Thu, 04 Dec 2003 09:05:20 +0000
To: "Axel Billen" <axel.billen@web.de>
Cc: xmlschema-dev@w3.org
Message-ID: <f5b7k1dvtpr.fsf@erasmus.inf.ed.ac.uk>

"Axel Billen" <axel.billen@web.de> writes:

> Hi!
> I am working on a projekt and i have to integrate XLink attributes in several Schema. I imported the xlink namespace and used the following tag: 
> <xs:anyAttribute namespace="http://www.w3.org/1999/xlink"/>  
> That worked fine. But sometimes i wanted to use only one attribute, like xlink:href. In this case i tried to use
> <xs:attribute ref="xlink:href" use="required" />.
> If i used this tag, my validator would throw an error, because of
> the namespace prefix. Why didnīt this tag work? Can you help me?

You need to include an ordinary namespace declaration for the xlink
prefix, e.g.

  <xs:attribute ref="xlink:href" use="required"

You probably want to put it higher up in your schema document.

You probably also want to specify a location where a schema document
with a declaration for that attribute can be found -- you can either
produce a tiny trivial one of your own, or use one of several that
have been produced and can be found on the web, e.g.


  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-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/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Thursday, 4 December 2003 04:05:21 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:04 UTC