jEdit Community - Resources for users of the jEdit Text Editor
Validating XHTML5: how do I add the custom datatypes from the Nu Html Checker (v.Nu)?
Submitted by Graham Hannington on Monday, 22 February, 2016 - 05:10
I would like to use the jEdit XML plugin to validate XHTML5 using the RELAX NG schema from the Nu Html Checker (v.Nu):

https://github.com/validator/validator

I have downloaded the RELAX NG schema files from the v.Nu GitHub repo, and set the schema (Plugins > XML > Set Schema) for a sample XHTML5 document to refer to the XHTML5 RELAX NG schema.

As I expected, jEdit reports the following error:

> datatype library "http://whattf.org/datatype-draft" not recognized

due to the following line in the schema files:

datatypes w = "http://whattf.org/datatype-draft"

I know that I need to make available to jEdit - in its class path - a .jar that contains the datatype library, as described in:

http://www.thaiopensource.com/relaxng/pluggable-datatypes.html

but so far, I've been unsuccessful. I'm a newbie Java developer, so I am very likely missing something obvious, but I thought this would be relatively straightforward, because both jEdit and v.Nu use Jing, so I thought it would simply be a matter of copying the relevant files from v.Nu to jEdit.

I've taken the latest-release vnu.jar and stripped everything out of it except:

\META-INF\services\
org.relaxng.datatype.DatatypeLibraryFactory

that contains the lines:

com.thaiopensource.datatype.xsd.DatatypeLibraryFactoryImpl
nu.validator.datatype.Html5DatatypeLibraryFactory

and

\nu\validator\datatype\
Html5DatatypeException.class
Html5DatatypeLibrary.class
Html5DatatypeLibraryFactory.class

but I don't know how to add that .jar to the jEdit class path (I'm using jEdit 5.2.0 with XML plugin 2.8.7 - I know, not quite the latest - on Windows 7). I don't know how to tell jedit.exe to add the location of this .jar to its class path. Whatever I try - adding a classpath option to the jEdit.l4j.ini file, or defining a CLASSPATH environment variable - the jEdit activity.log reports:

Log: java.class.path=C:\Program Files\jEdit\jedit.jar

I even tried copying the contents of my "cut down" vnu.jar into jedit.jar, to no effect.

I'm stumped. How do I add the custom datatypes from v.Nu to jEdit?
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Adding the datatype .jar to the class path
by Graham Hannington on Mon, 22/02/2016 - 14:36
Adding my .jar to the Class-Path in the jing.jar MANIFEST.MF doesn't work, either. (That is, when my .jar is in the same directory as jing.jar.)

I tried adding the entire release vnu.jar to (the end of) that Class-Path instead, but that appears to cripple jEdit; at least, its XML parsing. I don't see any errors in activity.log; the XML parsing just seems to stop working. And selecting "Plugins > XML > Set Schema" silently fails (does not show a dialog where you can select a schema).
User login
Browse archives
« May 2017  
MoTuWeThFrSaSu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
20
21
22
23
25
26
27
28
29
30
31
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
33%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1092
Syndication
file   ver   dls
German Localization light   4.4.2.1   50256
Context Free Art (*.cfdg)   0.31   40397
JBuilder scheme   .001   16577
ColdFusion scheme   1.0   16138
BBEdit scheme   1.0   16137
R Edit Mode - extensive version   0.1   14306
Advanced HTML edit mode   1.0   13655
Matlab Edit Mode   1.0   13534
jEdit XP icons   1.0   13017
XP icons for jEdit   1.1   12044