diff --git a/README b/README index fb85cf4..3e90db3 100644 --- a/README +++ b/README @@ -5,7 +5,7 @@ Based on Linux Scanner Server 1.2 Beta Released under the GPL 2.0 -Last Update: 10/11/2015 (Month/Day/Year) +Last Update: 5/24/2016 (Month/Day/Year) For Version: 1.5-16 Change Log: @@ -14,94 +14,139 @@ Change Log: PHP Linux Scanner Server is a PHP web application that allows you to share multiple scanners (supported by SANE) over a network. The following packages need to be installed: -* imagemagick (6.5.9+) - For image conversion -* sane-utils - For accessing scanners -* usbutils - For updating the device path of scanners using libusb -* tesseract-ocr - For image to text conversion -* apache2 - A web server -* php5 - For running php -* coreutils - For various purposes, not having this would probably result in an unusable system -* php5-json - For storing/transferring/parsing data (If this package is not available, it may already be part of php5) -+ php5-curl - For uploading scans to imgur.com -+ tar - For downloading a copy of PHP Linux Scanner Server in .tar.bz2 format (link in footer) -+ zip - For downloading a compressed scan -+ php-fpdf - For downloading a pdf file -+ libpaper-utils - For detecting paper sizes -+ sed - Used in the fall-back method of detecting tesseract languages -+ grep - Used in the fall-back method of detecting tesseract languages -_ hplip - Required for HP scanner support -_ cups - Required if you want to use the printer service -_ php5-cli - For running php from command line -_ curl - For making url request via command line through the network (alternative to php5-cli) -_ tesseract-ocr-eng - English language file for tesseract -_ tesseract-ocr-equ - Equations file for tesseract -_ tesseract-ocr-osd - Script and Orientation file for tesseract -_ tesseract-ocr-afr - Afrikaans language file for tesseract -_ tesseract-ocr-ara - Arabic language file for tesseract -_ tesseract-ocr-aze - Azerbaijani language file for tesseract -_ tesseract-ocr-bel - Belarusian language file for tesseract -_ tesseract-ocr-ben - Bengali language file for tesseract -_ tesseract-ocr-bul - Bulgarian language file for tesseract -_ tesseract-ocr-cat - Catalan language file for tesseract -_ tesseract-ocr-ces - Czech language file for tesseract -_ tesseract-ocr-chi-sim - Simplified Chinese language file for tesseract -_ tesseract-ocr-chi-tra - Traditional Chinese language file for tesseract -_ tesseract-ocr-chr - Cherokee language file for tesseract -_ tesseract-ocr-dan - Danish language file for tesseract -_ tesseract-ocr-deu - German language file for tesseract -_ tesseract-ocr-deu-frak - German Fraktur language file for tesseract -_ tesseract-ocr-ell - Greek language file for tesseract -_ tesseract-ocr-enm - Middle English language file for tesseract -_ tesseract-ocr-epo - Esperanto language file for tesseract -_ tesseract-ocr-est - Estonian language file for tesseract -_ tesseract-ocr-eus - Basque language file for tesseract -_ tesseract-ocr-fin - Finnish language file for tesseract -_ tesseract-ocr-fra - French language file for tesseract -_ tesseract-ocr-frk - Frankish language file for tesseract -_ tesseract-ocr-frm - Middle French language file for tesseract -_ tesseract-ocr-glg - Galician language file for tesseract -_ tesseract-ocr-grc - Ancient Greek file for tesseract -_ tesseract-ocr-heb - Hebrew language file for tesseract -_ tesseract-ocr-hin - Hindi language file for tesseract -_ tesseract-ocr-hrv - Croatian language file for tesseract -_ tesseract-ocr-hun - Hungarian language file for tesseract -_ tesseract-ocr-ind - Indonesian language file for tesseract -_ tesseract-ocr-isl - Icelandic language file for tesseract -_ tesseract-ocr-ita - Italian language file for tesseract -_ tesseract-ocr-ita-old - Old Italian language file for tesseract -_ tesseract-ocr-jpn - Japanese language file for tesseract -_ tesseract-ocr-kan - Kannada language file for tesseract -_ tesseract-ocr-kor - Korean language file for tesseract -_ tesseract-ocr-lav - Latvian language file for tesseract -_ tesseract-ocr-lit - Lithuanian language file for tesseract -_ tesseract-ocr-mal - Malayalam language file for tesseract -_ tesseract-ocr-mkd - Macedonian language file for tesseract -_ tesseract-ocr-mlt - Maltese language file for tesseract -_ tesseract-ocr-msa - Malay language file for tesseract -_ tesseract-ocr-nld - Dutch language file for tesseract -_ tesseract-ocr-nor - Norwegian language file for tesseract -_ tesseract-ocr-pol - Polish language file for tesseract -_ tesseract-ocr-por - Portuguese language file for tesseract -_ tesseract-ocr-ron - Romanain language file for tesseract -_ tesseract-ocr-rus - Russian language file for tesseract -_ tesseract-ocr-slk - Slovak language file for tesseract -_ tesseract-ocr-slk-frak - Slovak Fractur language file for tesseract -_ tesseract-ocr-slv - Slovenian language file for tesseract -_ tesseract-ocr-spa - Spanish language file for tesseract -_ tesseract-ocr-spa-old - Old Spanish language file for tesseract -_ tesseract-ocr-sqi - Albanian language file for tesseract -_ tesseract-ocr-srp - Serbian language file for tesseract -_ tesseract-ocr-swa - Swahili language file for tesseract -_ tesseract-ocr-swe - Swedish language file for tesseract -_ tesseract-ocr-tam - Tamil language file for tesseract -_ tesseract-ocr-tel - Telugu language file for tesseract -_ tesseract-ocr-tgl - Tagalog language file for tesseract -_ tesseract-ocr-tha - Thai language file for tesseract -_ tesseract-ocr-tur - Turkish language file for tesseract -_ tesseract-ocr-ukr - Ukranian language file for tesseract -_ tesseract-ocr-vie - Vietnamese language file for tesseract -_ fortune - For displaying fortunes in the debug console -_ cowsay - For wrapping fortunes in ASCII art +* imagemagick (6.5.9+) - For image conversion +* sane-utils - For accessing scanners +* usbutils - For updating the device path of scanners using libusb +* tesseract-ocr - For image to text conversion +* apache2 - A web server +* coreutils - For various purposes, not having this would probably result in an unusable system +* php5 - For running php +* php - Ubuntu 16.04 + | For running php +* php5-json - For storing/transferring/parsing data (If this package is not available, it may already be part of php5) +* php-json - Ubuntu 16.04 + | For storing/transferring/parsing data (If this package is not available, it may already be part of php5) ++ php5-curl - For uploading scans to imgur.com ++ php-curl - Ubuntu 16.04 + | For uploading scans to imgur.com ++ tar - For downloading a copy of PHP Linux Scanner Server in .tar.bz2 format (link in footer) ++ zip - For downloading a compressed scan ++ php-fpdf - For downloading a pdf file ++ libpaper-utils - For detecting paper sizes ++ sed - Used in the fall-back method of detecting tesseract languages ++ grep - Used in the fall-back method of detecting tesseract languages +_ hplip - Required for HP scanner support +_ cups - Required if you want to use the printer service +_ php5-cli - For running php from command line +_ php-cli - Ubuntu 16.04 + | For running php from command line +_ curl - For making url request via command line through the network (alternative to php5-cli) +_ tesseract-ocr-afr - Afrikaans language file for tesseract +_ tesseract-ocr-amh - Amharic language file for tesseract +_ tesseract-ocr-ara - Arabic language file for tesseract +_ tesseract-ocr-asm - Assamese language file for tesseract +_ tesseract-ocr-aze - Azerbaijani language file for tesseract +_ tesseract-ocr-aze-cyrl - Azerbaijani (Cyrillic) language file for tesseract +_ tesseract-ocr-bel - Belarusian language file for tesseract +_ tesseract-ocr-ben - Bengali language file for tesseract +_ tesseract-ocr-bod - Tibetan Standard language file for tesseract +_ tesseract-ocr-bos - Bosnian language file for tesseract +_ tesseract-ocr-bul - Bulgarian language file for tesseract +_ tesseract-ocr-cat - Catalan language file for tesseract +_ tesseract-ocr-ceb - Cebuano language file for tesseract +_ tesseract-ocr-ces - Czech language file for tesseract +_ tesseract-ocr-chi-sim - Simplified Chinese language file for tesseract +_ tesseract-ocr-chi-tra - Traditional Chinese language file for tesseract +_ tesseract-ocr-chr - Cherokee language file for tesseract +_ tesseract-ocr-cym - Welsh language file for tesseract +_ tesseract-ocr-dan - Danish language file for tesseract +_ tesseract-ocr-dan-frak - Danish (Fraktur) language file for tesseract +_ tesseract-ocr-deu - German language file for tesseract +_ tesseract-ocr-deu-frak - German Fraktur language file for tesseract +_ tesseract-ocr-dzo - Dzongkha language file for tesseract +_ tesseract-ocr-ell - Greek language file for tesseract +_ tesseract-ocr-eng - English language file for tesseract +_ tesseract-ocr-enm - Middle English language file for tesseract +_ tesseract-ocr-epo - Esperanto language file for tesseract +_ tesseract-ocr-equ - equations language file for tesseract +_ tesseract-ocr-est - Estonian language file for tesseract +_ tesseract-ocr-eus - Basque language file for tesseract +_ tesseract-ocr-fas - Persian language file for tesseract +_ tesseract-ocr-fin - Finnish language file for tesseract +_ tesseract-ocr-fra - French language file for tesseract +_ tesseract-ocr-frk - Frankish language file for tesseract +_ tesseract-ocr-frm - Middle French language file for tesseract +_ tesseract-ocr-gle - Irish language file for tesseract +_ tesseract-ocr-gle-uncial - Irish (Uncial) language file for tesseract +_ tesseract-ocr-glg - Galician language file for tesseract +_ tesseract-ocr-grc - Ancient Greek language file for tesseract +_ tesseract-ocr-guj - Gujarati language file for tesseract +_ tesseract-ocr-hat - Hatian language file for tesseract +_ tesseract-ocr-heb - Hebrew language file for tesseract +_ tesseract-ocr-hin - Hindi language file for tesseract +_ tesseract-ocr-hrv - Croatian language file for tesseract +_ tesseract-ocr-hun - Hungarian language file for tesseract +_ tesseract-ocr-iku - Inuktitut language file for tesseract +_ tesseract-ocr-ind - Indonesian language file for tesseract +_ tesseract-ocr-isl - Icelandic language file for tesseract +_ tesseract-ocr-ita - Italian language file for tesseract +_ tesseract-ocr-ita-old - Old Italian language file for tesseract +_ tesseract-ocr-jav - Javanese language file for tesseract +_ tesseract-ocr-jpn - Japanese language file for tesseract +_ tesseract-ocr-kan - Kannada language file for tesseract +_ tesseract-ocr-kat - Georgian language file for tesseract +_ tesseract-ocr-kat-old - Old Georgian language file for tesseract +_ tesseract-ocr-kaz - Kazakh language file for tesseract +_ tesseract-ocr-khm - Khmer language file for tesseract +_ tesseract-ocr-kir - Kyrgyz language file for tesseract +_ tesseract-ocr-kor - Korean language file for tesseract +_ tesseract-ocr-kur - Kurdish language file for tesseract +_ tesseract-ocr-lao - Lao language file for tesseract +_ tesseract-ocr-lat - Latin language file for tesseract +_ tesseract-ocr-lav - Latvian language file for tesseract +_ tesseract-ocr-lit - Lithuanian language file for tesseract +_ tesseract-ocr-mal - Malayalam language file for tesseract +_ tesseract-ocr-mar - Marathi language file for tesseract +_ tesseract-ocr-mkd - Macedonian language file for tesseract +_ tesseract-ocr-mlt - Maltese language file for tesseract +_ tesseract-ocr-msa - Malay language file for tesseract +_ tesseract-ocr-mya - Burmese language file for tesseract +_ tesseract-ocr-nep - Nepali language file for tesseract +_ tesseract-ocr-nld - Dutch language file for tesseract +_ tesseract-ocr-nor - Norwegian language file for tesseract +_ tesseract-ocr-ori - Oriya language file for tesseract +_ tesseract-ocr-osd - script and orientation language file for tesseract +_ tesseract-ocr-pan - Punjabi language file for tesseract +_ tesseract-ocr-pol - Polish language file for tesseract +_ tesseract-ocr-por - Portuguese language file for tesseract +_ tesseract-ocr-pus - Pashto language file for tesseract +_ tesseract-ocr-ron - Romanian language file for tesseract +_ tesseract-ocr-rus - Russian language file for tesseract +_ tesseract-ocr-san - Sanskrit language file for tesseract +_ tesseract-ocr-sin - Sinhala language file for tesseract +_ tesseract-ocr-slk - Slovak language file for tesseract +_ tesseract-ocr-slk-frak - Slovak Fractur language file for tesseract +_ tesseract-ocr-slv - Slovenian language file for tesseract +_ tesseract-ocr-spa - Spanish language file for tesseract +_ tesseract-ocr-spa-old - Old Spanish language file for tesseract +_ tesseract-ocr-sqi - Albanian language file for tesseract +_ tesseract-ocr-srp - Serbian language file for tesseract +_ tesseract-ocr-srp-latn - Serbian (Latin) language file for tesseract +_ tesseract-ocr-swa - Swahili language file for tesseract +_ tesseract-ocr-swe - Swedish language file for tesseract +_ tesseract-ocr-syr - Syriac language file for tesseract +_ tesseract-ocr-tam - Tamil language file for tesseract +_ tesseract-ocr-tel - Telugu language file for tesseract +_ tesseract-ocr-tgk - Tajik language file for tesseract +_ tesseract-ocr-tgl - Tagalog language file for tesseract +_ tesseract-ocr-tha - Thai language file for tesseract +_ tesseract-ocr-tir - Tigrinya language file for tesseract +_ tesseract-ocr-tur - Turkish language file for tesseract +_ tesseract-ocr-uig - Uyghur language file for tesseract +_ tesseract-ocr-ukr - Ukranian language file for tesseract +_ tesseract-ocr-urd - Urdu language file for tesseract +_ tesseract-ocr-uzb - Uzbek language file for tesseract +_ tesseract-ocr-uzb-cyrl - Uzbek (Cyrillic) language file for tesseract +_ tesseract-ocr-vie - Vietnamese language file for tesseract +_ tesseract-ocr-yid - Yiddish language file for tesseract +_ fortune - For displaying fortunes in the debug console +_ cowsay - For wrapping fortunes in ASCII art * Mandatory + Recommended for full functionality _ Optional or required for full functionality diff --git a/index.php b/index.php index e34c72a..a58776d 100644 --- a/index.php +++ b/index.php @@ -598,8 +598,7 @@ function quit(){ 0, -1 )."]" - ); - debugMsg(count($OP));*/ + );*/ $OP=array(); $arr=explode('[=(^^)=]',exe('scanimage -f "%i[=(^^)=]%d[=(^^)=]%v %m %t[=(^^)=]"',true));// If a scanner breaks this it is trying to; Cat in a box: [=(^^)=] for($i=0,$max=count($arr);$i<$max-1;$i=$i+3) diff --git a/res/inc/langs.php b/res/inc/langs.php index 682db9f..8a35ba9 100644 --- a/res/inc/langs.php +++ b/res/inc/langs.php @@ -7,5 +7,11 @@ $lang=$langs[$i]; $Lang=html(!isset($LANGS->{$lang})?$lang:$LANGS->{$lang}); echo ""; - } + }/* + * Used to generate language file list for README file + $data=file_get_contents("/res/langs.json"); + $data=json_decode($data); + foreach($data as $key => $val){ + echo "_ tesseract-ocr-$key - $val language file for tesseract\n"; + }*/ ?> diff --git a/res/langs.json b/res/langs.json index a0361f9..b0093fa 100644 --- a/res/langs.json +++ b/res/langs.json @@ -1,70 +1,110 @@ { - "eng": "English", - "equ": "Equations", - "osd": "Script and Orientation", - "afr": "Afrikaans", - "ara": "Arabic", - "aze": "Azerbaijani", - "bel": "Belarusian", - "ben": "Bengali", - "bul": "Bulgarian", - "cat": "Catalan", - "ces": "Czech", - "chi-sim": "Simplified Chinese", - "chi-tra": "Traditional Chinese", - "chr": "Cherokee", - "dan": "Danish", - "deu": "German", - "deu-frak": "German Fraktur", - "deu-f": "German Fraktur", - "ell": "Greek", - "enm": "Middle English", - "epo": "Esperanto", - "est": "Estonian", - "eus": "Basque", - "fin": "Finnish", - "fra": "French", - "frk": "Frankish", - "frm": "Middle French", - "glg": "Galician", - "grc": "Ancient Greek", - "heb": "Hebrew", - "hin": "Hindi", - "hrv": "Croatian", - "hun": "Hungarian", - "ind": "Indonesian", - "isl": "Icelandic", - "ita": "Italian", - "ita-old": "Old Italian", - "jpn": "Japanese", - "kan": "Kannada", - "kor": "Korean", - "lav": "Latvian", - "lit": "Lithuanian", - "mal": "Malayalam", - "mkd": "Macedonian", - "mlt": "Maltese", - "msa": "Malay", - "nld": "Dutch", - "nor": "Norwegian", - "pol": "Polish", - "por": "Portuguese", - "ron": "Romanain", - "rus": "Russian", - "slk": "Slovak", - "slk-frak": "Slovak Fractur", - "slv": "Slovenian", - "spa": "Spanish", - "spa-old": "Old Spanish", - "sqi": "Albanian", - "srp": "Serbian", - "swa": "Swahili", - "swe": "Swedish", - "tam": "Tamil", - "tel": "Telugu", - "tgl": "Tagalog", - "tha": "Thai", - "tur": "Turkish", - "ukr": "Ukranian", - "vie": "Vietnamese" + "afr": "Afrikaans", + "amh": "Amharic", + "ara": "Arabic", + "asm": "Assamese", + "aze": "Azerbaijani", + "aze-cyrl": "Azerbaijani (Cyrillic)", + "bel": "Belarusian", + "ben": "Bengali", + "bod": "Tibetan Standard", + "bos": "Bosnian", + "bul": "Bulgarian", + "cat": "Catalan", + "ceb": "Cebuano", + "ces": "Czech", + "chi-sim": "Simplified Chinese", + "chi-tra": "Traditional Chinese", + "chr": "Cherokee", + "cym": "Welsh", + "dan": "Danish", + "dan-frak": "Danish (Fraktur)", + "deu": "German", + "deu-frak": "German Fraktur", + "dzo": "Dzongkha", + "ell": "Greek", + "eng": "English", + "enm": "Middle English", + "epo": "Esperanto", + "equ": "equations", + "est": "Estonian", + "eus": "Basque", + "fas": "Persian", + "fin": "Finnish", + "fra": "French", + "frk": "Frankish", + "frm": "Middle French", + "gle": "Irish", + "gle-uncial": "Irish (Uncial)", + "glg": "Galician", + "grc": "Ancient Greek", + "guj": "Gujarati", + "hat": "Hatian", + "heb": "Hebrew", + "hin": "Hindi", + "hrv": "Croatian", + "hun": "Hungarian", + "iku": "Inuktitut", + "ind": "Indonesian", + "isl": "Icelandic", + "ita": "Italian", + "ita-old": "Old Italian", + "jav": "Javanese", + "jpn": "Japanese", + "kan": "Kannada", + "kat": "Georgian", + "kat-old": "Old Georgian", + "kaz": "Kazakh", + "khm": "Khmer", + "kir": "Kyrgyz", + "kor": "Korean", + "kur": "Kurdish", + "lao": "Lao", + "lat": "Latin", + "lav": "Latvian", + "lit": "Lithuanian", + "mal": "Malayalam", + "mar": "Marathi", + "mkd": "Macedonian", + "mlt": "Maltese", + "msa": "Malay", + "mya": "Burmese", + "nep": "Nepali", + "nld": "Dutch", + "nor": "Norwegian", + "ori": "Oriya", + "osd": "script and orientation", + "pan": "Punjabi", + "pol": "Polish", + "por": "Portuguese", + "pus": "Pashto", + "ron": "Romanian", + "rus": "Russian", + "san": "Sanskrit", + "sin": "Sinhala", + "slk": "Slovak", + "slk-frak": "Slovak Fractur", + "slv": "Slovenian", + "spa": "Spanish", + "spa-old": "Old Spanish", + "sqi": "Albanian", + "srp": "Serbian", + "srp-latn": "Serbian (Latin)", + "swa": "Swahili", + "swe": "Swedish", + "syr": "Syriac", + "tam": "Tamil", + "tel": "Telugu", + "tgk": "Tajik", + "tgl": "Tagalog", + "tha": "Thai", + "tir": "Tigrinya", + "tur": "Turkish", + "uig": "Uyghur", + "ukr": "Ukranian", + "urd": "Urdu", + "uzb": "Uzbek", + "uzb-cyrl": "Uzbek (Cyrillic)", + "vie": "Vietnamese", + "yid": "Yiddish" } diff --git a/res/scanhelp/Epson NX200 flatbed scanner b/res/scanhelp/Epson NX200 flatbed scanner new file mode 100644 index 0000000..fb861c8 --- /dev/null +++ b/res/scanhelp/Epson NX200 flatbed scanner @@ -0,0 +1,70 @@ +Options specific to device `epson2:libusb:001:004': + Scan Mode: + --mode Lineart|Gray|Color [Lineart] + Selects the scan mode (e.g., lineart, monochrome, or color). + --depth 8 [inactive] + Number of bits per sample, typical values are 1 for "line-art" and 8 + for multibit scans. + --halftoning None|Halftone A (Hard Tone)|Halftone B (Soft Tone)|Halftone C (Net Screen)|Dither A (4x4 Bayer)|Dither B (4x4 Spiral)|Dither C (4x4 Net Screen)|Dither D (8x4 Net Screen)|Text Enhanced Technology|Download pattern A|Download pattern B [inactive] + Selects the halftone. + --dropout None|Red|Green|Blue [None] + Selects the dropout. + --brightness 0..0 [inactive] + Selects the brightness. + --sharpness -2..2 [inactive] + + --gamma-correction User defined (Gamma=1.0)|User defined (Gamma=1.8) [User defined (Gamma=1.8)] + Selects the gamma correction value from a list of pre-defined devices + or the user defined table, which can be downloaded to the scanner + --color-correction None|Built in CCT profile|User defined CCT profile [inactive] + Sets the color correction table for the selected output device. + --resolution 75|300|600|1200dpi [75] + Sets the resolution of the scanned image. + --threshold 0..255 [128] + Select minimum-brightness to get a white point + Advanced: + --mirror[=(yes|no)] [inactive] + Mirror the image. + --auto-area-segmentation[=(yes|no)] [inactive] + Enables different dithering modes in image and text areas + --red-gamma-table 0..255,... + Gamma-correction table for the red band. + --green-gamma-table 0..255,... + Gamma-correction table for the green band. + --blue-gamma-table 0..255,... + Gamma-correction table for the blue band. + --wait-for-button[=(yes|no)] [inactive] + After sending the scan command, wait until the button on the scanner + is pressed to actually start the scan process. + Color correction: + --cct-type Automatic|Reflective|Colour negatives|Monochrome negatives|Colour positives [inactive] + Color correction profile type + --cct-profile -2..2,... + Color correction profile data + Preview: + --preview[=(yes|no)] [no] + Request a preview-quality scan. + Geometry: + -l 0..215.9mm [0] + Top-left x position of scan area. + -t 0..297.18mm [0] + Top-left y position of scan area. + -x 0..215.9mm [215.9] + Width of scan-area. + -y 0..297.18mm [297.18] + Height of scan-area. + Optional equipment: + --source Flatbed [inactive] + Selects the scan source (such as a document-feeder). + --auto-eject[=(yes|no)] [inactive] + Eject document after scanning + --film-type Positive Film|Negative Film|Positive Slide|Negative Slide [inactive] + + --focus-position Focus on glass|Focus 2.5mm above glass [inactive] + Sets the focus position to either the glass or 2.5mm above the glass + --bay 1|2|3|4|5|6 [inactive] + Select bay to scan + --eject [inactive] + Eject the sheet in the ADF + --adf-mode Simplex|Duplex [inactive] + Selects the ADF mode (simplex/duplex) diff --git a/res/writeScripts/phpinfo.js b/res/writeScripts/phpinfo.js index 1f2ce22..009b04d 100644 --- a/res/writeScripts/phpinfo.js +++ b/res/writeScripts/phpinfo.js @@ -6,7 +6,7 @@ try{ ct=getID('container'); content.body.style.backgroundColor=getComputedStyle(ct,null).getPropertyValue('background-color'); - content.body.style.color=getComputedStyle(ct,null).getPropertyValue('color'); + //content.body.style.color=getComputedStyle(ct,null).getPropertyValue('color'); // What was this even for? s=content.evaluate("//tr[not(@class)]/td[not(@class)]/../../tr[not(@class)]",content,null,6,null); for(var i=s.snapshotLength-1;i>-1;i--){ s.snapshotItem(i).className='v';