[Top][All Lists]

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

bug#7096: 23.1; nxml-mode attribute validation with rnc

From: Stefan Majewski
Subject: bug#7096: 23.1; nxml-mode attribute validation with rnc
Date: Fri, 24 Sep 2010 17:10:27 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100915 Lightning/1.0b1 Thunderbird/3.0.8

Dear Emacs devs, @CC James Clark as initial developer of nxml-mode,

first of all thanks for emacs and especially thanks for nxml-mode, as I
couldn't do or wouldn't like to do without it.

I frequently encounter the following bug with nxml-mode:

Whenever I try to use specific attribute definitions that are well
covered within the specs of RelaxNG Compact syntax, Emacs does not
validate some RNC schemas correctly. Jing (after a convertion with
trang) and other relaxng tools, nevertheless do. I tried to debug it
myself, but can't see where it goes wrong, as everything indeed seems to
be correctly in place.

The bug certainly relates to the way attribute restrictions can be based
on Unicode Character Classes like \p{P} for punctuation or \p{L} for
letter. For some strange reason the definitions for Letter seem to work
while Punctuation is not handled correctly.

Consider this minimal example (RNC and corresponding XML):

test = element test {
     attribute att {
               xsd:token { pattern = "(\p{L}|\p{P})+" }

start = test

<!-- BEGIN XML -->
<test att="att_val"/>
<!-- END XML -->

Strange enough, it validates when the underscore ("_" (unicode 95,
included in \p{Pc} and thus \p{P}) is removed from the XML.

But it is not just the underscore, other punctuation characters fail as
well. I could not find an obvious error in nxml's definition of the
character classes in xsd-regexp.el

As this behaviour is against the specs, I would consider it a bug in

If there is anything more I could help to track this bug down, please
let me know.


| Stefan Majewski  | Department of English, University of Vienna     |
| VOICE Corpus     | Spitalgasse 2-4, Universitätscampus AAKH, Hof 8 |
|                  | A-1090 Vienna                                   |
| Research Ass.(IT)| Phone: +43 1 4277 424 46                        |

reply via email to

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