Re: Schema for XSLT

Dan Connolly <connolly@w3.org> writes:

> [...]
> 
> > I just spent the afternoon massaging my schema for XSLT. If you want to
> > check it out, it is at:
> > 
> >         http://www.develop.com/dbox/xml/xslt.xsd
> > 
> > I'd love to get feedback, especially from those who have April 7-compliant
> > schema parsers/validators.
> 
> I notice your're serving this up as application/octet-stream:
> 
> HTTP request sent, awaiting response... 200 OK
> 2 Server: Microsoft-IIS/4.0
> 3 Date: Wed, 19 Apr 2000 14:45:58 GMT
> 4 Content-Type: application/octet-stream
> 5 Accept-Ranges: bytes
> 6 Last-Modified: Tue, 18 Apr 2000 22:19:34 GMT
> 7 ETag: "68e8b62c84a9bf1:1672"
> 8 Content-Length: 13263
> 
> I suggest you teach your web server that .xsd should be served
> as text/xml or application/xml with whatever charset you're
> using.
> 
> I just tried using some code that Henry has worked on
> (i.e. http://dev.w3.org/cvsweb/xmlschema/), but
> this code seems to be having trouble following the reference
> 
>   <include schemaLocation="part2.xsd"/>
> 
> in
> 	http://www.w3.org/1999/XMLSchema

That's now fixed in the parser.

> By the way, henry, shouldn't that be
>   <include schemaLocation="XMLSchema-datatypes"/>
> ? Hmmm... no, that's the special datatypes-only namespace.
> Where is part2? Hmm... maybe this is a bug in the spec
> that I should report to xmlschema-comments, but I'm not sure.

No, it's just the spec using the XML Schema provision for spliting the 
schema for a single namespace, across two files.

> Anyway... here's what I get:
> 
> connolly@tux ../04schema-hacking[1013] ~ht/bin/xsv
> http://www.develop.com/dbox/xml/xslt.xsd
> http://www.w3.org/1999/XMLSchema
> schema-validating http://www.develop.com/dbox/xml/xslt.xsd using schemas
> ['http:
> //www.w3.org/1999/XMLSchema']
> Warning: 0x2030 is not a valid 8-bit XML character; ignored
>  in unnamed entity at line 196 char 68 of
> http://www.develop.com/dbox/xml/xslt.xsd

Yeah, the Python 1.5 substrate is still 8-bit, sigh.

Anyway, with the new version of the parser, public release Real Soon
Now, that's the only warning, no errors.

Actually applying it to a stylesheet gives errors, however:

schema-validating ../../xmlschema/xmlschema.xsl using schemas ['http://www.develop.com/dbox/xml/xslt.xsd']
Warning: Document has no DTD, validating abandoned
 (detected at end of prolog of document http://www.develop.com/dbox/xml/xslt.xsd)
Warning: 0x2030 is not a valid 8-bit XML character; ignored
 in unnamed entity at line 196 char 68 of http://www.develop.com/dbox/xml/xslt.xsd
schemaLocations from instance: []
Schema(s) OK
validating with type {Complex type stylesheet based on {None}*urType* contentType elementOnly:sequence: <schema.particle instance at 9223b0><schema.particle instance at 938c70><schema.attributeUse instance at 93af10><schema.attributeUse instance at 93e220><schema.attributeUse instance at 83f220><schema.attributeUse instance at 93eb80>}
Validation error: in unnamed entity at line 9 char 111 of file:/d:/Henry/xmlschema/xmlschema.xsl:
 required attribute {None}:version not present
Schema Error, during validation, in unnamed entity at line 235 char 13 of http://www.develop.com/dbox/xml/xslt.xsd:
 Undefined type {http://www.w3.org/1999/XMLSchema}:import-or-include referenced as type definition of include
Schema Error, during validation, in unnamed entity at line 236 char 13 of http://www.develop.com/dbox/xml/xslt.xsd:
 Undefined type {http://www.w3.org/1999/XMLSchema}:preserve-or-strip-space referenced as type definition of strip-space
Schema Error, during validation, in unnamed entity at line 237 char 13 of http://www.develop.com/dbox/xml/xslt.xsd:
 Undefined type {http://www.w3.org/1999/XMLSchema}:preserve-or-strip-space referenced as type definition of preserve-space
Schema Error, during validation, in unnamed entity at line 242 char 13 of http://www.develop.com/dbox/xml/xslt.xsd:
 Undefined type {http://www.w3.org/1999/XMLSchema}:variable-definition referenced as type definition of variable
Schema Error, during validation, in unnamed entity at line 243 char 13 of http://www.develop.com/dbox/xml/xslt.xsd:
 Undefined type {http://www.w3.org/1999/XMLSchema}:variable-definition referenced as type definition of param
Schema Error, during validation, in unnamed entity at line 80 char 9 of http://www.develop.com/dbox/xml/xslt.xsd:
 Undeclared attribute xml{http://www.w3.org/XML/1998/namespace}:space referenced
Schema Error, during validation, in unnamed entity at line 120 char 13 of http://www.develop.com/dbox/xml/xslt.xsd:
 Undefined type {http://www.w3.org/1999/XMLSchema}:variable-definition referenced as type definition of with-param
Schema Error, during validation, in unnamed entity at line 115 char 9 of http://www.develop.com/dbox/xml/xslt.xsd:
 Undefined type {http://www.w3.org/1999/XMLSchema}:variable-definition referenced as type definition of with-param
Schema Error, during validation, in unnamed entity at line 222 char 5 of http://www.develop.com/dbox/xml/xslt.xsd:
 Undefined type {http://www.w3.org/1999/XMLSchema}:variable-definition referenced as type definition of variable

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 Thursday, 20 April 2000 07:59:52 UTC