Validating XHTML5: how do I add the custom datatypes from the Nu Html Checker (v.Nu)?
Submitted by Monday, 22 February, 2016 - 05:10
on
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?
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?