[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rnc validation in nxml mode
From: |
patrick mc allister |
Subject: |
rnc validation in nxml mode |
Date: |
Mon, 17 Aug 2015 16:58:47 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
hello,
i've run into a problem with nxml when it's supposed to validate an
attribute subtype="a-b" against this definition:
data.word = token { pattern = "(\p{L}|\p{N}|\p{P}|\p{S})+" }
(for context:
http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-data.word.html)
nxml says "Attribute value invalid" because of the `-', but i think it
shouldn't: jing does not complain about this. changing to
subtype="edition+type" works.
does anyone have a suggestion how to work around this (preferably
other than hacking the schema)?
to reproduce quickly with a large-ish file:
(defun hacks/nxml-problem ()
(let ((tmpBuffer (get-buffer-create "* a tmp buffer *"))
(tmpSchema (make-temp-file "tei_schema" nil ".rnc")))
(message "Getting sample xml file ...")
(with-current-buffer tmpBuffer
(erase-buffer)
(url-insert-file-contents
"https://github.com/sarit/SARIT-corpus/raw/059961c3df606ecfd41159e8b62a7e3517b6e9e8/pramanavarttikalankarabhasya.xml"))
(message "Getting schema file ...")
(with-temp-file tmpSchema
(url-insert-file-contents
"https://raw.githubusercontent.com/sarit/SARIT-corpus/059961c3df606ecfd41159e8b62a7e3517b6e9e8/schemas/tei_all.rnc"))
(switch-to-buffer tmpBuffer)
(nxml-mode)
(rng-set-schema-file-and-validate tmpSchema)))
(hacks/nxml-problem)
--
patrick
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- rnc validation in nxml mode,
patrick mc allister <=