[Top][All Lists]

[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)


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:

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
    (message "Getting schema file ...")
    (with-temp-file tmpSchema
    (switch-to-buffer tmpBuffer)
    (rng-set-schema-file-and-validate tmpSchema)))



reply via email to

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