Is there a pure Javascript X/HTML validator? [closed] - javascript

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I want to know if there's an existing Javascript library for validating HTML, preferably not one that relies on a web API.
The closest I've found to this is John Resig's HTML parser, but that seems to be more about fixing HTML and converting it to XML.
So is there something out there already? And if not, how difficult (and lengthy) would it be to adapt John Resig's parser?

No, there isn't one. However I am writing one: https://github.com/peterjwest/html_validator

You can't validate HTML with Javascript, because Javascript is loaded from within the HTML, which means the HTML is already rendered by the browser, which means all you can see with Javascript is the dom tree. The dom tree is built by the browser, but renders with and 'fixes' invalidations.
In short: What you need to validate HTML, is the HTML source. Javascript has access to the DOM, but not to the source.
edit
And immediately after posting, I'm thinking... You don't mean validating its own page =) You just want to validate a string with a javascript... So ignore this =)

Related

How to convert HTML to Docx and PDF with JavaScript [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I want to be able to convert RichText HTML, output that I'll be able to get from an editor like TinyMCE or CKEditor and convert it to Docx and PDF with formatting intact. I tried to search up other methods but they use PHP, are online apps or desktop apps. I need to be able to convert it with JavaScript.
UPDATE
Since I couldn't find any solution that purely uses JS to convert documents, I used Unoconv instead. This allows me to convert a wide array of file types into HTML or any other file type.
I've used this for PDF creation: http://parall.ax/products/jspdf.
I've never done DocX creation, but this looks promising and I'd give it a shot: http://blog.innovatejs.com/?p=184.
FYI the package mentioned by MikeNQ above is only for Webkit, whereas jsPDF is cross-browser.

Symfony 2 minify dynamic javascript [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have to build a webservice in order to send a webpage to some others websites.
Theses websites will integrate this webpage inside another one.
I have to send the assets separetely from the webpage.
For performances issues, I musn't use AJAX requests.
One of my javascript files, need businness data in order to display and validate form fields according to complex business rules (Administration).
So far I'm using a "js.twig" template, so I can easily add my data to my script.
However, I'm asked to minify this file (performance and intellectual property).
How can I minify my file "on the fly" ?
Update :
I'm not asking for a tool. I already have one. I need leads about calling a "minifyier on the fly". Filo gave a pretty good on the subject.
probably this answer can help you:
https://stackoverflow.com/a/15947488/3625883
If you want a library in pure php to perform the compression, you can use https://code.google.com/p/minify/
For installation:
add in composer.json
"mrclay/minify": "2.2.0"
Then you can use Assetic filter: jsminplus (https://github.com/jbroadway/assetic/blob/master/lib/JSMinPlus.php )

Python tool to compile/include HTML in Javascript [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have a set of HTML files that I'd like to bundle into and access from Javascript.
For my Rails project I use the haml_coffee_assets gem. This gem generates a Javascript JST object that includes my templates. I can refer to a template, in Javascript, using
JST['template_name']()
This approach is very convenient because I can have a standalone Javascript file that includes everything.
Are there such tools for Python projects? A stand-alone tool? Something for Flask? Something for Django? I can write a stand-alone tool easily, but it'd be nice if something has already done this. Quick google search didn't return anything.
Thanks.
I believe what you are looking is called webassets. There is also a wrapper for Flask called Flask-Assets.

Javascript or HTML5 PDF Editor? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am looking for a component that will allow the user to edit PDF files within an ASP.NET web page.
It is mainly going to be used as a template editor to add blocks/form fields mainly to an existing PDF. It should have rulers etc.. within it.
I have been searching for such a component for a while now and have drawn a blank.
A finished component would be ideal or at least some pointers on how to go about it.
Regards
I am reasonably certain that there is no product that does this off-the-shelf.
Without writing the solution yourself, you will likely not find any web-editors that allow uploading and then editing a PDF on your server. Decent desktop PDF editors are generally expensive, and I imagine the security woes surrounding PDFs would make this a complex solution
As for approaches, there are ASP.NET products that will generate a pdf from text or a document. Depending on your needs this might be acceptable. You could possibly look into the PDF specification and pull the text into an editor and then regenerate the file.
I am not familiar with the Google Docs API, but if anyone had a capability along these lines they might be a good place to start.

is there any open source javascript component can realize the parse and query the RDF data? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
is there any open source javascript component can realize the parse and query the RDF data?
now i want to use javascript read and query the RDF file in local client, in server i use Jena. However until now i haven't found a good and efficient one, anybody knows something about this? waiting your suggestions ...
A couple of pointers:
rdfQuery: a Javascript library for RDF-related processing
RDF Query in Javascript demo: a W3C demo
I hope this helps.
It may be easier to use SPARQL to Jena, and ask for JSON results from the SPARQL server.
You can make a SPARQL query using XMLHTTPRequest in javascript. There's an example here: http://www.openlinksw.com/dataspace/dav/weblog/Comunity%20blog/1653
There is another javascript library:
http://www.w3.org/2001/sw/wiki/SPARQL_Javascript_Library
Think it is supports RDFj
http://code.google.com/p/backplanejs/wiki/Rdfj
Its worth looking at since both were developed by W3C working group members / invited experts
There's a library called jOWL that supports OWL Lite (therefore RDF too) and that has widgets for a tree visualisation of hierarchies.:
jowl

Categories

Resources