Thread: [Htmlvalidator-help] patches
Brought to you by:
mgueury
From: [LoN]Kamikaze <LoN...@gm...> - 2006-05-29 09:02:30
Attachments:
signature.asc
|
I've got a couple of questions: - Did you review the patches I sent you? - Do they break the Windows build or are the applicable? - Did you apply the file name (case) corrections that are necessary for a UNIX build? - Will you pack a download with the patched source? I also have a suggestion. The majority of problems on FreeBSD were caused by the case sensitivity for file names. Maybe you can install the ext2 driver for WinXP on your Windows system and do your Windows builds on a case sensitive file system. That way preparing the UNIX build will become a lot easier. - Dominic |
From: Marc G. <mg...@sk...> - 2006-05-29 23:04:49
|
Hi Dominic, Please get the new source here (http://users.skynet.be/mgueury/mozilla/preview_080.html) <http://users.skynet.be/mgueury/mozilla/preview_080.html> I have included the pathes in my source and I even builded a Linux version that worked, except that: - I had to copy manually the sgml-lib directory in the Firefox directory - the line numbering does not work on Linux. Except that it was working fine, There is a build_all.sh in the root of the C part of the extension to help to build it. Marc [LoN]Kamikaze wrote: > I've got a couple of questions: > > - Did you review the patches I sent you? > > - Do they break the Windows build or are the applicable? > > - Did you apply the file name (case) corrections that are necessary for > a UNIX build? > > - Will you pack a download with the patched source? > > > I also have a suggestion. The majority of problems on FreeBSD were > caused by the case sensitivity for file names. Maybe you can install the > ext2 driver for WinXP on your Windows system and do your Windows builds > on a case sensitive file system. That way preparing the UNIX build will > become a lot easier. > > - Dominic > > |
From: [LoN]Kamikaze <LoN...@gm...> - 2006-05-30 11:50:55
Attachments:
signature.asc
|
Marc Gueury wrote: > Hi Dominic, >=20 > Please get the new source here > (http://users.skynet.be/mgueury/mozilla/preview_080.html) > <http://users.skynet.be/mgueury/mozilla/preview_080.html> > I have included the pathes in my source and I even builded a Linux > version that worked, except that: > - I had to copy manually the sgml-lib directory in the Firefox director= y > - the line numbering does not work on Linux. >=20 > Except that it was working fine, >=20 > There is a build_all.sh in the root of the C part of the extension to h= elp > to build it. >=20 > Marc >=20 Thanks a lot, once I've got everything up and running I will start to work on the line numbering. |
From: [LoN]Kamikaze <LoN...@gm...> - 2006-05-30 14:54:27
Attachments:
signature.asc
|
Marc Gueury wrote: > Hi Dominic, >=20 > Please get the new source here > (http://users.skynet.be/mgueury/mozilla/preview_080.html) > <http://users.skynet.be/mgueury/mozilla/preview_080.html> > I have included the pathes in my source and I even builded a Linux > version that worked, except that: > - I had to copy manually the sgml-lib directory in the Firefox director= y > - the line numbering does not work on Linux. >=20 > Except that it was working fine, >=20 > There is a build_all.sh in the root of the C part of the extension to h= elp > to build it. >=20 > Marc >=20 I got it all to build fine, but build_xpi.sh doesn't pack libosp.so. Where does it belong? Even if I manually place it in xpi/components the extension tells me FATAL ERROR : The dynamic C library contained in the extension file could not be found. It doesn't tell me which one is not found. Something else I recognized, the extension identifies itself as 0.7.9.1 and the chrome/content/tidyValidate.js that is packed in tidy.jar massively differs from the one you sent me separately to work on line numbering. For example none of the addLineNumber functions are present. |
From: Marc G. <mg...@sk...> - 2006-05-30 19:08:29
|
Hi Dominic, I reuploaded the right version today that is from the 30/05/2006. Here, http://users.skynet.be/mgueury/mozilla/preview_080.html Please check here, you were right, the javascript part was the one of 0.791. On Linux, the libosp.a, is linked statically and there is no libosp.so, unlike on Windows. I suppose it will be the same for FreeBSD. Marc [LoN]Kamikaze wrote: > Marc Gueury wrote: > >> Hi Dominic, >> >> Please get the new source here >> (http://users.skynet.be/mgueury/mozilla/preview_080.html) >> <http://users.skynet.be/mgueury/mozilla/preview_080.html> >> I have included the pathes in my source and I even builded a Linux >> version that worked, except that: >> - I had to copy manually the sgml-lib directory in the Firefox directory >> - the line numbering does not work on Linux. >> >> Except that it was working fine, >> >> There is a build_all.sh in the root of the C part of the extension to help >> to build it. >> >> Marc >> >> > > I got it all to build fine, but build_xpi.sh doesn't pack libosp.so. > Where does it belong? Even if I manually place it in xpi/components the > extension tells me > > FATAL ERROR : The dynamic C library contained in the extension file > could not be found. > > It doesn't tell me which one is not found. Something else I recognized, > the extension identifies itself as 0.7.9.1 and the > chrome/content/tidyValidate.js that is packed in tidy.jar massively > differs from the one you sent me separately to work on line numbering. > For example none of the addLineNumber functions are present. > > |
From: [LoN]Kamikaze <LoN...@gm...> - 2006-05-30 20:08:58
Attachments:
signature.asc
|
Marc Gueury wrote: > Hi Dominic, >=20 > I reuploaded the right version today that is from the 30/05/2006. Here,= >=20 > http://users.skynet.be/mgueury/mozilla/preview_080.html >=20 > Please check here, you were right, the javascript part was > the one of 0.791. On Linux, the libosp.a, is linked statically and > there is no libosp.so, unlike on Windows. I suppose it will be the > same for FreeBSD. >=20 > Marc >=20 This version doesn't give me error messages, but it doesn't validate anything either. In the bottom right it just shows the green icon and -/-. In the view source the tidy windows stay empty, only the source is shown. The progress bar simply keeps on moving endlessly. |
From: Marc G. <mg...@sk...> - 2006-05-30 23:53:54
|
Hi Dominic, 0. type about:config in Firefox and check that javascript.options.showInConsole = true javascript.options.strict = true Restart Firefox. 1. Please look in the javascript console to see if you have any error. And which one. 2. Please also check that the libnstidy.so is well compiled and copied in the xpi/component directory before to be zipped. 3. Please also check the size of libosp.so and libosp.a. If the both have about the same size, it means that libosp.a will be static linked and libosp.so not needed. 4. If it does not work, consider to copy that library libnstidy.so in the Program directory of Firefox and see if it works. 5. make a ldd libnstidy.so just to check Marc [LoN]Kamikaze wrote: > Marc Gueury wrote: > >> Hi Dominic, >> >> I reuploaded the right version today that is from the 30/05/2006. Here, >> >> http://users.skynet.be/mgueury/mozilla/preview_080.html >> >> Please check here, you were right, the javascript part was >> the one of 0.791. On Linux, the libosp.a, is linked statically and >> there is no libosp.so, unlike on Windows. I suppose it will be the >> same for FreeBSD. >> >> Marc >> >> > > This version doesn't give me error messages, but it doesn't validate > anything either. In the bottom right it just shows the green icon and > -/-. In the view source the tidy windows stay empty, only the source is > shown. The progress bar simply keeps on moving endlessly. > > |
From: [LoN]Kamikaze <LoN...@gm...> - 2006-05-31 00:51:25
Attachments:
signature.asc
|
Marc Gueury wrote: > Hi Dominic, >=20 > 0. type about:config in Firefox and check that > javascript.options.showInConsole =3D true > javascript.options.strict =3D true > Restart Firefox. > 1. Please look in the javascript console to see if you have any error. > And which one. I get the following error: Error: uncaught exception: [Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFile.moveTo]" nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)" location: "JS frame :: chrome://tidy/content/tidyInstall.js :: tidyInstallPlatformLibraryIfNeeded :: line 124" data: no] > 2. Please also check that the libnstidy.so is well compiled and copied > in the > xpi/component directory before to be zipped. It is there. > 3. Please also check the size of libosp.so and libosp.a. If the both > have about > the same size, it means that libosp.a will be static linked and > libosp.so not needed. libosp.a has 3.9M and libosp.so has 2.1M. Does this look all right? libnstidy.so only has 1.9M. That doesn't look properly to me. > 4. If it does not work, consider to copy that library libnstidy.so in > the Program directory of > Firefox and see if it works. No, that doesn't help. > 5. make a ldd libnstidy.so just to check # ldd libnstidy.so libnstidy.so: libplds4.so.1 =3D> /usr/local/lib/libplds4.so.1 (0x2835e000) libplc4.so.1 =3D> /usr/local/lib/libplc4.so.1 (0x28385000) libnspr4.so.1 =3D> /usr/local/lib/libnspr4.so.1 (0x283ad000) libiconv.so.3 =3D> /usr/local/lib/libiconv.so.3 (0x283de000) libstdc++.so.5 =3D> /usr/lib/libstdc++.so.5 (0x284cc000) libm.so.4 =3D> /lib/libm.so.4 (0x2859f000) I'm out of ideas. |
From: Marc G. <mg...@sk...> - 2006-05-31 14:29:31
|
HI Dominic, Have you found the cause of the problem ? I see that you have sent another mail about line numbering ? The issue seems to be in, Error: uncaught exception: [Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFile.moveTo]" nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)" location: "JS frame :: chrome://tidy/content/tidyInstall.js :: tidyInstallPlatformLibraryIfNeeded :: line 124" data: no] The file tidyInstall.js is a file of the extension. I think that at line 124, it copies the directory sgml-lib from ~/.mozilla/profile/.../extension/{3....} to the directory where Firefox is installed If the user that started Firefox has no right to write in the directory where Firefox is installed it will probably gives this error. A) Please restart firefox as root and install the extension. B) Or move the directory manually from one place to the other. Hope it helps, Marc [LoN]Kamikaze wrote: > Marc Gueury wrote: > >> Hi Dominic, >> >> 0. type about:config in Firefox and check that >> javascript.options.showInConsole = true >> javascript.options.strict = true >> Restart Firefox. >> 1. Please look in the javascript console to see if you have any error. >> And which one. >> > > I get the following error: > > Error: uncaught exception: [Exception... "Component returned failure > code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFile.moveTo]" > nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)" location: "JS > frame :: chrome://tidy/content/tidyInstall.js :: > tidyInstallPlatformLibraryIfNeeded :: line 124" data: no] > > >> 2. Please also check that the libnstidy.so is well compiled and copied >> in the >> xpi/component directory before to be zipped. >> > > It is there. > > >> 3. Please also check the size of libosp.so and libosp.a. If the both >> have about >> the same size, it means that libosp.a will be static linked and >> libosp.so not needed. >> > > libosp.a has 3.9M and libosp.so has 2.1M. Does this look all right? > libnstidy.so only has 1.9M. That doesn't look properly to me. > > >> 4. If it does not work, consider to copy that library libnstidy.so in >> the Program directory of >> Firefox and see if it works. >> > > No, that doesn't help. > > >> 5. make a ldd libnstidy.so just to check >> > > # ldd libnstidy.so > libnstidy.so: > libplds4.so.1 => /usr/local/lib/libplds4.so.1 (0x2835e000) > libplc4.so.1 => /usr/local/lib/libplc4.so.1 (0x28385000) > libnspr4.so.1 => /usr/local/lib/libnspr4.so.1 (0x283ad000) > libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x283de000) > libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x284cc000) > libm.so.4 => /lib/libm.so.4 (0x2859f000) > > > I'm out of ideas. > > |
From: [LoN]Kamikaze <LoN...@gm...> - 2006-05-31 14:37:21
Attachments:
signature.asc
|
Marc Gueury wrote: > HI Dominic, >=20 > Have you found the cause of the problem ? I see that you have sent > another mail about line > numbering ? >=20 Well, have a look at that one. It's a lot of code, but it seems to work fine. And I tried to comment it to an acceptable degree. > A) Please restart firefox as root and install the extension. > B) Or move the directory manually from one place to the other. I am not fond of things that do things without the consent of my package system. Now that I know the cause I shall find a better solution. |
From: [LoN]Kamikaze <LoN...@gm...> - 2006-05-31 15:55:36
Attachments:
signature.asc
|
[LoN]Kamikaze wrote: >=20 > Marc Gueury wrote: >> A) Please restart firefox as root and install the extension. >> B) Or move the directory manually from one place to the other. >=20 > I am not fond of things that do things without the consent of my packag= e > system. Now that I know the cause I shall find a better solution. >=20 When dealing with sgml-lib by tidy will again complain about the missing library. I tried putting libnstidy.so and libosp.so almost anywhere where it would make even the smallest degree of sense to no avail. |
From: Marc G. <mg...@sk...> - 2006-05-31 22:58:16
|
Maybe you can try to start Firefox with Truss/Strace to see what it does ? Please look also the message in the javascript console. Normally the library shoud be in the extension dir after install, something like this: ~/.mozilla/firefox/m7flzp39.default/extensions/{3b56bcc7-54e5-44a2-9b44-66c3ef58c13e}/components/libnstidy.so Marc [LoN]Kamikaze wrote: > [LoN]Kamikaze wrote: > >> Marc Gueury wrote: >> >>> A) Please restart firefox as root and install the extension. >>> B) Or move the directory manually from one place to the other. >>> >> I am not fond of things that do things without the consent of my package >> system. Now that I know the cause I shall find a better solution. >> >> > > When dealing with sgml-lib by tidy will again complain about the missing > library. I tried putting libnstidy.so and libosp.so almost anywhere > where it would make even the smallest degree of sense to no avail. > > |
From: [LoN]Kamikaze <LoN...@gm...> - 2006-05-31 23:05:38
Attachments:
signature.asc
|
Marc Gueury wrote: > Maybe you can try to start Firefox with Truss/Strace to see what it doe= s ? > Please look also the message in the javascript console. >=20 > Normally the library shoud be in the extension dir after install, > something like this: >=20 > ... >=20 Yes, it's there. That's the confusing part. Anyway, I will have a look at those tools you suggested. Thanks a lot. Did you test the line numbering, yet? |
From: [LoN]Kamikaze <LoN...@gm...> - 2006-05-31 13:38:14
Attachments:
signature.asc
tidyValidate.js
|
Here is my version of tidyValidate.js that can do line numbering independent of the line wrapping. I introduced the attributes document, viewsource and sourcelist and the methods list, unlist, listNodeChildren, unlistNodeChildren. Apart from that I made changes to the showLineNumber method. Please do not use listNodeChildren and unlistNodeChildren directly, they will most likely destroy the document if not called through list and unlist, since they don't contain any checking. This line numbering breaks the go to line feature. |
From: [LoN]Kamikaze <LoN...@gm...> - 2006-06-01 16:32:38
Attachments:
signature.asc
|
Marc Gueury wrote: > Hi Dominic, >=20 > I just look the result. It is good in a way is that the line wrapping > works fine. It works > really well for small files. Unhappily, there are also big files. I am > attaching one to this mail. > Adding the line number with your procedure takes 20/30 sec on my pC and= > Firefox ask to > stop the script. This is the problem with most algorithm I used for now= =2E > There are too slow. >=20 > This is pity since your code is really well written and would work on > Unix ... >=20 > Marc >=20 > Ps : see the attached file >=20 OK, I'm on it, I think I can deal with this by paralleling the process. I spent 10 minutes on this and I got it so far that Firefox completely locks up for 20 seconds on my Pentium-M 1300MHz. After this it will react normally and be done with the numbering - without complaining about the script. I think I can make the script do the numbering in background. I expect it to take about 40 seconds for the file you sent me when I'm done, with the advantage that Firefox stays usable during that period. A nice side effect will be that machines with more than one core would do the numbering significantly faster. |
From: [LoN]Kamikaze <LoN...@gm...> - 2006-06-02 01:07:45
Attachments:
signature.asc
tidyValidate.js
|
Marc Gueury wrote: > Hi Dominic, > > I just look the result. It is good in a way is that the line wrapping > works fine. It works > really well for small files. Unhappily, there are also big files. I am > attaching one to this mail. > Adding the line number with your procedure takes 20/30 sec on my pC and > Firefox ask to > stop the script. This is the problem with most algorithm I used for now. > There are too slow. > > This is pity since your code is really well written and would work on > Unix ... > > Marc > The attached file is the multi threaded implementation of my algorithm. To my surprise I get the best results on a single core machine when I spawn 16 parallel threads. I don't know weather it makes sense to double it on a dual core machine, but this could be made tunable in the options. I'd suggest the options 8, 16, 32, 64, 128 and 256. I don't think that more would make sense. Less than 8 is a bad idea, at least on my machine. Now, some changes that I had to make outside of my methods: The method start() is now taking a parameter. This parameter is required to be able to spawn processes with setTimeout that run methods within the object. Thus it has to hold the name of a globally accessible variable that points to the object. That means the lines: oTidyValidate = new TidyValidate(); oTidyValidate.start(); are changed into: oTidyValidate = new TidyValidate(); oTidyValidate.start('oTidyValidate'); I also changed the function tidyValidateHtml() to call my line numbering implementation instead of yours. Unfortunately there are still some problems left. The "Go to line" feature does not work. If line numbers are present this could be achieved simply by jumping to the Nth <li> in the document. Alternatively every line could be equipped with an <a name="lineXXX" /> at the beginning. Another problem is that switching highlighting on or off hides the line numbers. Even removing them and activating them again doesn't fix this. My guess is that the style of the <ol> gets changed (to be found through the attribute sourceList). So this shouldn't be too difficult to fix. I hope this version will stand up to your testing. |
From: [LoN]Kamikaze <LoN...@gm...> - 2006-06-02 11:33:47
Attachments:
signature.asc
|
I recognized that my algorithm does not recognize nested line breaks. So here is a version that reorganizes the document until all line breaks are direct children of the <pre> tags. I also fixed the line numbering calls to use setTimeout(), to spawn the line numbering in a different thread, so that Firefox keeps reacting while everything is prepared to start the parallel threaded part of the line numbering. Also I removed a bug where lines disappeared when a <pre> only contains a single line, which is the case in about:blank. On my Pentium-M 1300 MHz your lot_of_lines.html takes 32 seconds. That means it does 341 lines per second, which is OK for me, considering the massive amount of parsing and restructuring that is done. |
From: [LoN]Kamikaze <LoN...@gm...> - 2006-06-02 11:34:51
Attachments:
signature.asc
tidyValidate.js
|
Stupid me forgot to attach the file. |