From: "Graham Hannington" <graham_hannington@fundi.com.au>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Using Emacs nXML mode to validate XHTML5 using the v.Nu schemas: support for HTTP-based schema URI?
Date: Wed, 16 Mar 2016 16:45:49 +0800 [thread overview]
Message-ID: <OF2C03633E.EEE4B631-ON48257F78.002C578D-48257F78.0030B0CE@LocalDomain> (raw)
In-Reply-To: <jwvk2l37rbv.fsf-monnier+gmane.emacs.help@gnu.org>
Hi Stefan,
Re:
> the naive approach...
Good point.
> It could also use a cache
Yes, jEdit does this, but I can't see myself getting the time to (a) learn
Lisp and (b) implement something similar for Emacs nXML, so I'm going to
drop this idea for now.
Thanks for the patch anyway, that's very kind of you.
Re:
> I'd welcome some help to improve the html5-schema so that the HTML it
accepts includes SVG elements.
Yes, I can help, but be prepared for some tedious detail. If you're prone
to responding "tl;dr", look away now ;-).
From the description of the html5-schema package (
https://elpa.gnu.org/packages/html5-schema.html):
> The RelaxNG files are taken straight from
https://github.com/validator/validator.git's via:
> git subtree -P schema/html5 split
The problem with that approach - taking files "straight" from the v.Nu
GitHub repo - is this:
> Some schemas in the v.Nu GitHub repository - in particular, schemas that
combine markup languages - refer to file paths that do not exist in the
repository. The paths exist only in the context of the distributed files
(inside vnu.jar).
> These nonexistent paths prevent the schemas being usable directly from
the v.Nu repo (for example, via GitHub Pages URLs).
For details, see the readme at (my) repo:
https://github.com/unsoup/validator
As described in that readme, I extracted the schemas from vnu.jar and
compared them with the schemas in the repo.
Today, prompted by your email, I went two steps further:
1. I developed a Microsoft Windows PowerShell script (sorry, that's my
primary working environment) that completely automates a process that I
had previously done manually:
a. Downloads the latest release of the vnu.jar .zip from GitHub
b. Extracts vnu.jar from the .zip
c. Copies the schema files from their single ("flat") directory in vnu.jar
to a directory of your choice, re-creating the same relative directory
structure as the URI paths used by v.Nu.
The result is a set of schema files that matches what v.Nu uses, with
relative include paths that work.
2. I uploaded the results of running that script to:
https://github.com/unsoup/validator/tree/gh-pages/schema-release
To improve the html5-schema package, replace its contents with the
contents of the unsoup/validator/schema-release directory (perhaps minus
the readme).
That is: use the v.Nu schemas from vnu.jar, not from the GitHub repo.
To "accept" SVG elements in an XHTML5 document, use the following schema
file:
xhtml5_rdfalite.rnc
which matches the Validator.nu "preset":
XHTML + SVG 1.1 + MathML 3.0 + RDFa Lite 1.1
For details, see the readme at:
https://github.com/unsoup/validator/tree/gh-pages/schema-release
(I might add to that readme a table that matches Validator.nu presets to
schema file names.)
Let me know how you get on.
I plan to upload that PowerShell script in the next few days.
In time, I might even schedule that script to run every so often, and
introduce further automated steps, to get the latest-release vnu.jar,
extract its schemas, and commit any changes to the copy in the
unsoup/validator/schema-release directory.
Cheers,
Graham
Fundi Software Pty Ltd 2016 ABN 89 009 120 290
This message has been scanned for malware by Websense. www.websense.com
next prev parent reply other threads:[~2016-03-16 8:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 6:03 Using Emacs nXML mode to validate XHTML5 using the v.Nu schemas: support for HTTP-based schema URI? Graham Hannington
2016-03-15 14:40 ` Stefan Monnier
2016-03-16 8:45 ` Graham Hannington [this message]
2016-03-16 12:27 ` Stefan Monnier
2016-03-16 14:09 ` Graham Hannington
[not found] ` <jwv7fh2z5eb.fsf-monnier+emacs@gnu.org>
2016-03-17 9:37 ` Graham Hannington
2016-03-17 12:38 ` Stefan Monnier
2016-03-31 5:37 ` On-the-fly validation of (X)HTML5 using the v.Nu REST API Graham Hannington
2016-03-31 17:54 ` Emanuel Berg
2016-03-31 18:20 ` Stefan Monnier
2016-03-31 18:40 ` Emanuel Berg
2016-04-01 9:22 ` Graham Hannington
2016-04-01 13:10 ` Stefan Monnier
2016-04-01 19:13 ` Emanuel Berg
2016-04-01 4:50 ` Graham Hannington
2016-04-01 19:08 ` Emanuel Berg
2016-03-16 14:47 ` Using Emacs nXML mode to validate XHTML5 using the v.Nu schemas: support for HTTP-based schema URI? Graham Hannington
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OF2C03633E.EEE4B631-ON48257F78.002C578D-48257F78.0030B0CE@LocalDomain \
--to=graham_hannington@fundi.com.au \
--cc=help-gnu-emacs@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.