HTML Tidy complied successful with some minor troubles.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

HTML Tidy complied successful with some minor troubles.

submit@freeiphonedatarecovery.com
Recently, I am on a project of converting HTML to XHTML. In vs2010, I started writing programs to run, this is a test. In the tidy..h example, is noted. I added added library file, there areseveral projects with library files and so on.
here is the code:

Ran successfully.
Results are as follows:



Files after conversionapparently, is the header file, unlike the second inside is starting with the XML declaration. This function also has a problem. where goes wrong?

My customer owns this site: http://www.freeiphonedatarecovery.com, which contains some basic bugs that violation of w3 standard even though I have tried to fix.



Reply | Threaded
Open this post in threaded view
|

Re: HTML Tidy complied successful with some minor troubles.

Geoff McLane
Hi,

Ok, you seem to have successfully written a test app to use tidy
library... that's good...

You say 'This function also has a problem.', and assume you refer to
tidySaveBuffer(...), but it is not clear???

And then you ask 'where goes wrong?'!

Well, exactly what goes wrong? What do you expect?

You passed the library just a small snippet of html, so of course Tidy
library expanded it to a full xhtml document...

What else should it do? Maybe you need to be using other parts of the
API if you want something different...

Some points about your program...

I have a little repo, 'Tidy Test' -
https://github.com/geoffmcl/tidy-test - that also links to the tidy library.

It contains a FindTidy.cmake, that will correctly find the installed
library tidy, if you convert your project to use cmake for the
configuration, and generation of the MSVC solution files...

This would mean you would not have to use the non portable MSVC #pragma
comment(lib, "tidy.lib")... In other words making your project more
portable...

And as you may know using "tidy.lib" means you are linking with the
shared (DLL) library, which then must be in the PATH, or in the same
folder to run...

For such a standalone app perhaps it is better to use the 'static'
library, "tidys.lib"...

Anyway, maybe you will get some more information on the tidy library API
from the 'Test Tidy' repo...

Maybe if you explained more exactly what you are trying to do, I may be
able to help more...

Regards,
Geoff.

PS: Also have an ongoing WIP 'Tidy GUI 2' repo -
https://github.com/geoffmcl/tidy-gui2 - which needs Qt installed to
build, but it may also reveal some more things about using the tidy
library API...


Reply | Threaded
Open this post in threaded view
|

Re: HTML Tidy complied successful with some minor troubles.

tOM Trottier
For a real random test, you could try the top 1,000,000 sites' home pages or google
random dictionary words. That should find most bugs that send the program to cloud
cuckoo land.

tOM
--
tOM Trottier http://TomTrottier.com BBO:"0 carbon"
613-860-6633 [hidden email] Skype:Abacurial
MD5 Fingerprint
27:B8:BA:91:70:E5:44:20:8F:29:EE:46:1E:52:F6:81
SHA1      
23:3A:53:18:AB:83:B1:CA:O7:33:AF:10:11:24:27:95:22:98:4
E:7E
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS$/B$/IT$/O d++(--)@>+ s:+>: a++(--)>+++
C++>++++ ULH---> P+>+++
L+>++ !E W+++ N+ w++ O M !V P+ PE- Y+ PGP t 5- X R*
tv+ b++ DI+++ D G
e+++>++++ h----> r+++>++ y++++>++
------END GEEK CODE BLOCK------