all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#7096: 23.1; nxml-mode attribute validation with rnc
@ 2010-09-24 15:10 Stefan Majewski
  0 siblings, 0 replies; only message in thread
From: Stefan Majewski @ 2010-09-24 15:10 UTC (permalink / raw
  To: 7096; +Cc: jjc

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

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

start = test
##END RNC


<!-- 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
nxml-mode.

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

cheers,
Stefan

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






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-24 15:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-24 15:10 bug#7096: 23.1; nxml-mode attribute validation with rnc Stefan Majewski

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.