csl-validator.js

I compiled rnv to JavaScript using emscripten and added a little bit of additional code to get it to validate CSL. The resulting JS is a little on the large side (648K, although only 120K gizpped), but in my limited testing, it seems to work quite well. I put up a demo at http://simonster.github.com/csl-validator.js/.

Simon

Seems to work well for me too. I will consider if it makes sense to
integrate it with the editor I’m working on to provide better validation. I
already have some code which uses the schema to inform the UI, the best
option would be to improve this to be a strict validator, but currently
this seems too much work so your validator could be useful. The footprint
and the fact it isn’t hand-coded javascript are disadvantages though.

Thanks for sharing!
Steve

Very cool!

Will you keep the demo running at
http://simonster.github.com/csl-validator.js/, or do you think you’ll
ultimately host it at zotero.org instead ? Already in it’s current form
this validator seems easier to use than validator.nu (no need to check
certain boxes and specify the URL to the CSL schema), so we might want to
direct people to this new validator instead.

RintzeOn Tue, Apr 17, 2012 at 2:27 AM, Simon Kornblith <@Simon_Kornblith>wrote:

I like it very much as well, thanks so much!

Now the obligatory small feature request :slight_smile: Is there a way to make it possible to paste a URL to the CSL file, and then have some kind of APIs (really can just be a bookmarlket) to get the link to the CSL file baked into the validator URL? I find it handy to validate the gist posted for pull requests. In the case of the validator.nu, it’s nice that you can paste a link to the validation itself, as an URL, that the CSL creator can just click on to get to the validation page and see the errors. It’s really not critical to have of course, it’s just convenient and helps us help less experienced CSL contributors.

charles

Well, there is that little “fork me” link :wink:

Ah, those open-source people, very annoying :wink: