Re: [Craig Brown <cmb@research.canon.com.au>] XSV

ht@cogsci.ed.ac.uk (Henry S. Thompson) writes:

> From: Craig Brown <cmb@research.canon.com.au>
> Subject: XSV
> To: ht@cogsci.ed.ac.uk
> Date: Tue, 25 Jul 00 23:25:23 +1000
> 
> Henry,
> 
> Call me an idiot but.....
> 
> I have been trying to get your XSV running on my local machine.
> I downloaded the stuff as suggested.
> 
> First glitch - when the validator sees:
> 
> <xsd:schema
> 	xmlns:xsd="http://www.w3.org/1999/XMLSchema"
> >
> 
> it goes looking for the www.w3.org site and does not work.  I want
> this to run on a laptop when offline.
> 
> Next - I downloaded various stuff from http://www.w3.org/1999/XMLSchema
> and changed my .xsd document to:
> 
> <xsd:schema
> 	xmlns:xsd="XMLSchema.xml"

That can't possibly work -- you _must_ use the right namespace name
for things to be recognised as schemas at all.  If you want to check
against a local copy, use the
{http://www.w3.org/1999/XMLSchema-instance}schemaLocation feature, or
supply the correct local version on the command line, e.g.

python applyschema.py [your schema doc't URL here] [URL of local copy of XMLSchema.xsd here]

> Also - while I've got your attention - I am working with key and keyref.
> Can you use these with a complexType rather than an element. eg:
> 
> <xsd:complexType blah>
>   <xsd:element ID type="ID"/>
> </xsd:complexType>
> 
> <xsd:key>
>   <xsd:selector>blah</xsd:selector>
>   <xsd:field>@ID</xsd:field>
> </xsd:key>

xsd:key and friends must appear inside <xsd:element>.  If you want
global scope, put them inside the <xsd:element> which declares the
document element.

ht
-- 
  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 Tuesday, 25 July 2000 11:10:20 UTC