help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using Emacs nXML mode to validate XHTML5 using the v.Nu schemas: support


From: Graham Hannington
Subject: Using Emacs nXML mode to validate XHTML5 using the v.Nu schemas: support for HTTP-based schema URI?
Date: Tue, 15 Mar 2016 14:03:14 +0800

I am using Emacs nXML mode to validate XHTML5 documents with the Nu Html 
Checker (v.Nu) schemas.

Sincere thanks to all who made this possible, including the developers of:
- Emacs (and Chris Zheng, for providing an Emacs for Windows binary at 
http://emacsbinw64.sourceforge.net/)
- nXML
- The GitHub repo hober/html5-el, which provides the datatype library 
required by the v.Nu schemas in a Lisp-based format usable by nXML (rather 
than, say, a Java-based library usable by Jing)

I'm grateful and happy. But I could be even happier, hence this email.

Rather than using a snapshot of the v.Nu schemas downloaded to my local 
file system, I'd like to refer to the "living" v.Nu schemas in the GitHub 
repo via HTTP.

I can already do that in other validating XML editors that use Jing 
(again, thanks to Mr Clark), such as jEdit. I'd like to do that in Emacs, 
too.

For example, in emacs\share\emacs\24.5\etc\schema\schemas.xml (those 
backslashes betray the fact I'm using Emacs on Windows :-) ), I want to 
specify:

  <uri pattern="*.xhtml" typeId="XHTML5"/>
  <typeId id="XHTML5" uri="
http://unsoup.github.io/validator/schema/xhtml5-all.rnc"/>

For background on why I'm referring to an "unsoup" URL rather than 
directly to the v.Nu repo, see:

https://github.com/unsoup/validator

(I must update that readme to mention raw.githubusercontent.com as an 
alternative to github.io URLs.)

However, that "http://..."; uri attribute value causes the following error 
in Emacs:

> Invalid URI: "URI `http:/// ... ' does not use the `file:' scheme"

so, for now, I'm pointing to a snapshot of the v.Nu schemas on my local 
file system.

That's okay - it's working, which is great - but I'd prefer to point to 
the "live" schemas via HTTP.

I'd appreciate advice on adding support for HTTP URLs to that uri 
attribute value (and also include directives in the .rnc files) or, better 
still, an update to nXML that includes this support (I'm not a Lisp 
programmer, but I could learn).

Regards,
Graham Hannington

Fundi Software Pty Ltd  2016  ABN 89 009 120 290


This message has been scanned for malware by Websense. www.websense.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]