Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ca8de60
Showing
4 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
syntax: | ||
svn co http://svn.versiondude.net/whattf/syntax/trunk/ syntax | ||
|
||
clean: | ||
rm *~ *.elc | ||
|
||
distclean: | ||
rm -rf syntax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
This project provides the ability to use `nxml-mode` to edit XHTML5 | ||
documents with validation. First, you'll need to fetch the RELAX NG | ||
schema from the WHAT Task Force subversion repository; a simple `make` | ||
in this directory should do the trick. | ||
|
||
Next, you'll need to add this directory to your `load-path`. Let's | ||
assume you've placed it in `~/code/html5-el/`. | ||
|
||
(add-to-list 'load-path "~/code/html5-el/") | ||
|
||
Finally, wire this stuff into `nxml-mode` like so, altering the path to | ||
`schemas.xml` appropriately. | ||
|
||
(eval-after-load "rng-loc" | ||
'(add-to-list 'rng-schema-locating-files "~/code/html5-el/schemas.xml")) | ||
|
||
(eval-after-load "rng-dt" | ||
'(require 'whattf-dt)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!-- RELAX NG Schema for HTML 5: schema locating rules for nxml-mode --> | ||
<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0"> | ||
<uri pattern="*.html" typeId="XHTML5"/> | ||
<uri pattern="*.xhtml" typeId="XHTML5"/> | ||
<namespace ns="http://www.w3.org/1999/xhtml" typeId="XHTML5"/> | ||
<documentElement localName="html" typeId="XHTML5"/> | ||
<typeId id="XHTML5" uri="syntax/relaxng/xhtml5.rnc"/> | ||
</locatingRules> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
;;; whattf-dt.el --- WHAT Task Force datatype library for Emacs Lisp | ||
|
||
;; Copyright (C) 2009 Edward O'Connor | ||
|
||
;; Author: Edward O'Connor <hober0@gmail.com> | ||
;; Keywords: hypermedia | ||
|
||
;; Permission is hereby granted, free of charge, to any person obtaining | ||
;; a copy of this software and associated documentation files (the | ||
;; "Software"), to deal in the Software without restriction, including | ||
;; without limitation the rights to use, copy, modify, merge, publish, | ||
;; distribute, sublicense, and/or sell copies of the Software, and to | ||
;; permit persons to whom the Software is furnished to do so, subject to | ||
;; the following conditions: | ||
|
||
;; The above copyright notice and this permission notice shall be | ||
;; included in all copies or substantial portions of the Software. | ||
|
||
;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
;; BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
;; ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
;; CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
;; SOFTWARE. | ||
|
||
;;; Commentary: | ||
|
||
;; Eventually, this file will contain elisp definitions for the various | ||
;; WHATTF datatypes <URL:http://hsivonen.iki.fi/html5-datatypes/>. | ||
|
||
;; For now, this file provides a dummy datatype validator to | ||
;; `nxml-mode', so that you can use the WHATTF HTML5 RELAX-NG schema for | ||
;; validating your markup. | ||
|
||
;;; Code: | ||
|
||
(put 'http://whattf.org/datatype-draft | ||
'rng-dt-compile | ||
'whattf-dt-compile) | ||
|
||
(defun whattf-dt-compile (name params) | ||
"Provides WHAT Task Force datatypes as a RELAX NG datatypes library. | ||
NAME is a symbol giving the local name of the datatype. PARAMS is a list | ||
of pairs (PARAM-NAME . PARAM-VALUE) where PARAM-NAME is a symbol giving | ||
the name of the parameter and PARAM-VALUE is a string giving its value." | ||
(list t 'identity)) | ||
|
||
(provide 'whattf-dt) | ||
;;; whattf-dt.el ends here |