473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

validation utility?

If someone were to write a utility that would go through your html,
and javascript code and validate it/modify it, what language/
technology would you experts suggest I use? I know that the W3C
already does this, but I wanted to write something simple on my own
just for learning purposed. Anyway, I was thinking about using C# or
javascript, that would accept the files, and then call some external
objects/classes to handle the parsing and manipulation of the files. I
guess what I was wondering is if there is a better alternative or an
open source project I could modify to handle this?
THanks

Nov 14 '07 #1
6 1309
In article <11**********************@k79g2000hse.googlegroups .com>, carlos <ca***********@gmail.comwrote:
>If someone were to write a utility that would go through your html,
and javascript code and validate it/modify it, what language/
technology would you experts suggest I use? I know that the W3C
already does this,
Right, so why re-invent the wheel?
but I wanted to write something simple on my own
just for learning purposed.
Then I suggest you start with a simple project.

This isn't it.

--
Regards,
Doug Miller (alphageek at milmac dot com)

It's time to throw all their damned tea in the harbor again.
Nov 14 '07 #2
In comp.lang.javascript message <11**********************@k79g2000hse.go
oglegroups.com>, Wed, 14 Nov 2007 14:44:34, carlos
<ca***********@gmail.composted:
>If someone were to write a utility that would go through your html,
and javascript code and validate it/modify it, what language/
technology would you experts suggest I use? I know that the W3C
already does this, but I wanted to write something simple on my own
just for learning purposed.
Full validation is a major project, unsuitable for anyone who is leaning
either the coding language or the language being validated.
Anyway, I was thinking about using C# or
javascript, that would accept the files,
Since this would be a text processing project, you would need good text-
processing routines. Javascript has RegExps; C# may need library
routines.
and then call some external
objects/classes to handle the parsing and manipulation of the files.

You might find it appropriate to code, for practice or use, something
that helps with some of the problems of finding where the actual error
is in incorrect code.

For example, within <URL:http://www.merlyn.demon.co.uk/js-quick.htmI
have a routine to indent Javascript in accordance with its {...}
structure (provided that within a line {...} within strings and comment
balance); and in <URL:http://www.merlyn.demon.co.uk/js-misc1.htm#DCI
have a utility for checking day-of-week in HTML.

I also have a Batch file to generate indented index lists for headings
in HTML pages (also with provisos, but ones easy to accept).

Start with something reasonably simple; and before that do something
easy.

It's a good idea to read the newsgroup c.l.j and its FAQ. See below.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Nov 14 '07 #3
On Nov 14, 2:18 pm, Dr J R Stockton <j...@merlyn.demon.co.ukwrote:
In comp.lang.javascript message <1195051474.265340.267...@k79g2000hse.go
oglegroups.com>, Wed, 14 Nov 2007 14:44:34, carlos
<carlos4ubu...@gmail.composted:
If someone were to write a utility that would go through your html,
and javascript code and validate it/modify it, what language/
technology would you experts suggest I use? I know that the W3C
already does this, but I wanted to write something simple on my own
just for learning purposed.

Full validation is a major project, unsuitable for anyone who is leaning
either the coding language or the language being validated.
Anyway, I was thinking about using C# or
javascript, that would accept the files,

Since this would be a text processing project, you would need good text-
processing routines. Javascript has RegExps; C# may need library
routines.
and then call some external
objects/classes to handle the parsing and manipulation of the files.

You might find it appropriate to code, for practice or use, something
that helps with some of the problems of finding where the actual error
is in incorrect code.

For example, within <URL:http://www.merlyn.demon.co.uk/js-quick.htmI
have a routine to indent Javascript in accordance with its {...}
structure (provided that within a line {...} within strings and comment
balance); and in <URL:http://www.merlyn.demon.co.uk/js-misc1.htm#DCI
have a utility for checking day-of-week in HTML.

I also have a Batch file to generate indented index lists for headings
in HTML pages (also with provisos, but ones easy to accept).

Start with something reasonably simple; and before that do something
easy.

It's a good idea to read the newsgroup c.l.j and its FAQ. See below.

--
(c) John Stockton, Surrey, UK. ?...@merlyn.demon.co.uk Turnpike v6.05 IE 6
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Thanks for the comments!

I think my post may have came across the wrong way, for I am not
trying to re-invent any validation programs like the WSC. I do realize
that validating againts all those cases is difficult. However, I used
that as an example, because I would like to do something simple like
check for a specific typo in my javascript code(Just one or two
though!!!). That is what I meant when I said that my implementation
would be simple.
I will look into what Dr JR Stockton suggested.

Thanks
Nov 15 '07 #4
carlos said the following on 11/15/2007 12:44 AM:

<snip>
Thanks for the comments!

I think my post may have came across the wrong way, for I am not
trying to re-invent any validation programs like the WSC. I do realize
that validating againts all those cases is difficult. However, I used
that as an example, because I would like to do something simple like
check for a specific typo in my javascript code(Just one or two
though!!!). That is what I meant when I said that my implementation
would be simple.
If all you want is something to check your JS for typos and the like,
JSLint already does that along with more:

<URL: http://www.jslint.com/>

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 15 '07 #5
In comp.lang.javascript message <bs*********************@giganews.com>,
Sun, 18 Nov 2007 01:02:10, Randy Webb <Hi************@aol.composted:
>Dr J R Stockton said the following on 11/17/2007 5:45 PM:
>In comp.lang.javascript message <Eq*********************@giganews.com>,
Sat, 17 Nov 2007 13:27:26, Randy Webb <Hi************@aol.composted:
>>Dr J R Stockton said the following on 11/16/2007 8:23 AM:
And, *no* utility could ever find all typos without human
intervention.
There was no claim made that one could find *all*. Finding some is of
some use.
>>>"Its not likely to have among it's powers that of being able to find
the errors in this string.";
>I didn't say they aren't. I wrote "There are no *JS* errors in that
string ....". Perhaps you should read what I wrote more carefully and
realize that I was not referring to grammatical errors when I wrote "JS
errors".
Indeed; but you should acknowledge that I write the string, and I did
not impose that limitation. Errors which are not code errors are worth
finding.

--
(c) John Stockton, Surrey, UK. ??*@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/- FAQish topics, acronyms, & links.
Check boilerplate spelling -- error is a public sign of incompetence.
Never fully trust an article from a poster who gives no full real name.
Nov 18 '07 #6
Dr J R Stockton said the following on 11/18/2007 2:29 PM:
In comp.lang.javascript message <bs*********************@giganews.com>,
Sun, 18 Nov 2007 01:02:10, Randy Webb <Hi************@aol.composted:
>Dr J R Stockton said the following on 11/17/2007 5:45 PM:
>>In comp.lang.javascript message <Eq*********************@giganews.com>,
Sat, 17 Nov 2007 13:27:26, Randy Webb <Hi************@aol.composted:
Dr J R Stockton said the following on 11/16/2007 8:23 AM:

>And, *no* utility could ever find all typos without human
intervention.

There was no claim made that one could find *all*. Finding some is of
some use.
And that is what JSLint does. Geez.
>>>>"Its not likely to have among it's powers that of being able to find
the errors in this string.";
>I didn't say they aren't. I wrote "There are no *JS* errors in that
string ....". Perhaps you should read what I wrote more carefully and
realize that I was not referring to grammatical errors when I wrote "JS
errors".

Indeed; but you should acknowledge that I write the string, and I did
not impose that limitation. Errors which are not code errors are worth
finding.
I never said you did impose that limitation. I said there were no "JS
Errors" to be found in a string that you said JSLint couldn't find
errors in. Stop waffling.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 19 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Will Stuyvesant | last post by:
Can you give a commandline example how to do XML Validation (checking against a DTD) with Python? Not with 4Suite or other 3rd party libraries, just the Python standard distribution. I have...
1
by: | last post by:
Dear Justin, Thanks for your reply! Let me explain you my concern in detail.... I have a login field which I am validating using RequiredValidator control. Now when a user omits this...
3
by: interuser | last post by:
Hi How can I prevent an event (eg button click) from happening from within page_load? The reason is that I want to make my existing application work for netscape, for which there are no client...
1
by: Shaker | last post by:
For simplicity, I have on one form: -textbox1/Requiere For validation1 / submitbuttun1, -textbox2/Requiere For validation2 / submitbuttun2, I have two submit buttons on an ASP.Net page with...
2
by: msnews.microsoft.com | last post by:
Hi All, I m facing a problem. As u know asp.net vallidators did not work in non-microsoft browsers. So for that i m using Server Side Solution. But i don't understand how can i show the...
8
by: jaYPee | last post by:
i have downloaded the sample of cell by cell validation from this site http://www.syncfusion.com/faq/winforms/search/773.asp but it is a c sharp. anyone have a vb version of this sample program?
3
by: Bob Alston | last post by:
I have a routine to copy data to new versions of my app via insert into sql statements. Unfortunately, due to evolution of my app, sometimes the new version has more restrictive editing than an...
5
by: Lloyd Dupont | last post by:
On my page the user is ask to set of question. Say there I have 2 controls like that == pseudo-C#-code for my control == class MyControl : CompositeControl { TextBox text; LinkButton button ...
5
by: paul_zaoldyeck | last post by:
does anyone know how to validate an xml file against multiple defined schema? can you show me some examples? i'm making here an xml reader.. thank you
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.