By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,831 Members | 1,031 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,831 IT Pros & Developers. It's quick & easy.

Open Source project needs quick help from regexp expert: XML Namevalidation

P: n/a
Hello,

I'm working on an open source JS version [1] of WAX (Writing API for
XML). Most unit tests work [2] , but I need a regexp that validates
strings are proper XML names [3]. I suck at regexps :-/

If the regexp only matches the latin subset of unicode characters
(i.e. english only), it would be OK for now.

[1] http://dev.abiss.gr/wax.js/
[2] http://dev.abiss.gr/wax.js/test/testwax.html
[3] http://www.w3.org/TR/REC-xml/#NT-Name

Thanks,

Manos
Sep 26 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
manos wrote:
I'm working on an open source JS version [1] of WAX (Writing API for
XML). Most unit tests work [2] , but I need a regexp that validates
strings are proper XML names [3]. I suck at regexps :-/
Change that, then:

<http://oreilly.com/catalog/regex/chapter/ch04.html>
<http://developer.mozilla.org/En/Core_JavaScript_1.5_Reference:Global_Objects:RegEx p>
[3] http://www.w3.org/TR/REC-xml/#NT-Name
Doesn't the ABNF already provide the approach?
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Sep 26 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.