all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Majewski <stefan.majewski@univie.ac.at>
To: 7096@debbugs.gnu.org
Cc: jjc@public.jclark.com
Subject: bug#7096: 23.1; nxml-mode attribute validation with rnc
Date: Fri, 24 Sep 2010 17:10:27 +0200	[thread overview]
Message-ID: <4C9CBF63.4050604@univie.ac.at> (raw)

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                        |






                 reply	other threads:[~2010-09-24 15:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C9CBF63.4050604@univie.ac.at \
    --to=stefan.majewski@univie.ac.at \
    --cc=7096@debbugs.gnu.org \
    --cc=jjc@public.jclark.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.