NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 673 - Support for Compact Schema validation on arbitrary XML
Support for Compact Schema validation on arbitrary XML
Status: RESOLVED FIXED
Product: Validator.nu
Classification: Unclassified
Component: RELAX NG back end
HEAD
All All
: P2 minor
Assigned To: Henri Sivonen
http://static.webvm.net/relaxng/
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-03 13:20 CET by Kai Hendry
Modified: 2009-11-04 16:27 CET (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Hendry 2009-11-03 13:20:14 CET
I noticed your validator.nu is linked from http://relaxng.org/#validators

However I could not figure out how to validate this XML: http://static.webvm.net/relaxng/policy.xml with this Compact schema: http://static.webvm.net/relaxng/bondixml.rnc

http://validator.nu/?doc=http%3A%2F%2Fstatic.webvm.net%2Frelaxng%2Fpolicy.xml&schema=http%3A%2F%2Fstatic.webvm.net%2Frelaxng%2Fbondixml.rnc

The error message is    1. IO Error: Non-XML Content-Type: text/plain. so I assume it didn't like the Compact RelaxNG schema content type.
Comment 1 Simon Pieters 2009-11-03 13:31:11 CET
You can check the "Be lax about HTTP Content-Type" checkbox. However then I get a message saying "IO Error: HTTP resource not retrievable. The HTTP status from the remote server was: 404." but I get 200 OK with http://www.rexswain.com/httpview.html
Comment 2 Henri Sivonen 2009-11-03 15:04:49 CET
Does it work if you configure your server per http://www.iana.org/assignments/media-types/application/relax-ng-compact-syntax
Comment 3 Kai Hendry 2009-11-03 15:17:28 CET
(In reply to comment #2)
> Does it work if you configure your server per
> http://www.iana.org/assignments/media-types/application/relax-ng-compact-syntax

Ok, I added:
AddType relax-ng-compact-syntax .rnc

Now I get:
      IO Error: Non-XML Content-Type: relax-ng-compact-syntax.
Comment 4 Simon Pieters 2009-11-03 15:22:15 CET
You should have

AddType application/relax-ng-compact-syntax .rnc
Comment 5 Kai Hendry 2009-11-03 15:24:00 CET
Ok, now I'm trying:

AddType application/relax-ng-compact-syntax .rnc


And I get Simon's 
      IO Error: HTTP resource not retrievable. The HTTP status from the remote server was: 404.



Hmm, I don't get a 404 whilst testing it from my various shells & w3m.
Comment 6 Kai Hendry 2009-11-04 16:27:57 CET
Sorry it only just occurred to me I could look at my server logs and lo and behold:

File does not exist: /srv/www/static.webvm.net/relaxng/xmldsig-core-schema.rnc


There was an include in the schema. I've since copied it in and it works!


I guess validator.nu's error message could be a little more helpful.