Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Open Source project needs quick help from regexp expert: XML Namevalidation

Reply
Thread Tools

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

 
 
manos
Guest
Posts: n/a
 
      09-26-2008
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
 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      09-26-2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[regexp] How to convert string "/regexp/i" to /regexp/i - ? Joao Silva Ruby 16 08-21-2009 05:52 PM
Volunteer -- Java/XML for Open Source Public Voting Project dechert@gmail.com Java 4 07-02-2007 04:58 PM
How do you open a Java open source project in an IDE Sathyaish Java 3 01-11-2007 12:19 PM
open source project needs help ako... Ruby 3 11-17-2006 03:47 AM
Open Source Conference in Japan: Open Source Realize Forum 2005 pat eyler Ruby 1 03-05-2005 03:50 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57