--- /srv/rebuilderd/tmp/rebuilderdO6DZVl/inputs/htp_1.19-8+b1_riscv64.deb +++ /srv/rebuilderd/tmp/rebuilderdO6DZVl/out/htp_1.19-8+b1_riscv64.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2024-01-29 07:46:02.000000 debian-binary │ --rw-r--r-- 0 0 0 3656 2024-01-29 07:46:02.000000 control.tar.xz │ --rw-r--r-- 0 0 0 116180 2024-01-29 07:46:02.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 3652 2024-01-29 07:46:02.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 116004 2024-01-29 07:46:02.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./control │ │ │ @@ -1,13 +1,13 @@ │ │ │ Package: htp │ │ │ Source: htp (1.19-8) │ │ │ Version: 1.19-8+b1 │ │ │ Architecture: riscv64 │ │ │ Maintainer: Marcelo Soares Mota │ │ │ -Installed-Size: 641 │ │ │ +Installed-Size: 650 │ │ │ Depends: libc6 (>= 2.34) │ │ │ Section: web │ │ │ Priority: optional │ │ │ Homepage: http://htp.sourceforge.net │ │ │ Description: nice HTML pre-processor │ │ │ htp is an HTML pre-processor. It is designed to be a flexible authoring tool │ │ │ that can easily be integrated into the HTML design process. │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -1,28 +1,28 @@ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-29 07:46:02.000000 ./ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-29 07:46:02.000000 ./usr/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-29 07:46:02.000000 ./usr/bin/ │ │ │ -rwxr-xr-x 0 root (0) root (0) 59704 2024-01-29 07:46:02.000000 ./usr/bin/htp │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-29 07:46:02.000000 ./usr/share/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-29 07:46:02.000000 ./usr/share/doc/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/ │ │ │ --rw-r--r-- 0 root (0) root (0) 9723 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/alttext.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10522 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/alttext.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1418 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/alttext.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 8850 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/block.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9462 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/block.html │ │ │ -rw-r--r-- 0 root (0) root (0) 781 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/block.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 8100 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/blockdef.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9782 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/blockdef.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1075 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/blockdef.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 4763 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/bugs.html │ │ │ -rw-r--r-- 0 root (0) root (0) 737 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/bugs.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 878 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/changelog.Debian.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 216 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/changelog.Debian.riscv64.gz │ │ │ --rw-r--r-- 0 root (0) root (0) 11816 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/comment.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12384 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/comment.html │ │ │ -rw-r--r-- 0 root (0) root (0) 676 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/comment.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 13083 2020-06-14 23:16:46.000000 ./usr/share/doc/htp/copyright │ │ │ --rw-r--r-- 0 root (0) root (0) 17195 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/def.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17964 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/def.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3601 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/def.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 8030 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/default.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3149 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/default.htp │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/examples/ │ │ │ -rw-r--r-- 0 root (0) root (0) 536 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/Makefile.sub │ │ │ -rw-r--r-- 0 root (0) root (0) 2404 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/album.hti │ │ │ -rw-r--r-- 0 root (0) root (0) 1087 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/album.htt │ │ │ @@ -33,43 +33,43 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 818 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/prime.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 1576 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/examples/quine.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1576 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/quine.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 604 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/section.def │ │ │ -rw-r--r-- 0 root (0) root (0) 1189 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/examples/section.html │ │ │ -rw-r--r-- 0 root (0) root (0) 918 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/section.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 375 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/section.htt │ │ │ --rw-r--r-- 0 root (0) root (0) 11553 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/expand.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13032 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/expand.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3702 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/expand.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 17423 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/file.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17453 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/file.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2490 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/file.htp.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 14293 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/history.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3946 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/history.htp.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 3911 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/hlhtp.pl │ │ │ -rw-r--r-- 0 root (0) root (0) 165 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/htp.def │ │ │ -rw-r--r-- 0 root (0) root (0) 4049 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/htp.htt │ │ │ --rw-r--r-- 0 root (0) root (0) 12242 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/if.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9263 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/if.html │ │ │ -rw-r--r-- 0 root (0) root (0) 932 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/if.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 9443 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/imageurl.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9679 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/imageurl.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2507 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/imageurl.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 8662 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/img.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8898 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/img.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1168 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/img.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 10059 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/inc.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10628 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/inc.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1092 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/inc.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 9881 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/include.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1894 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/include.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 4874 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/index.html │ │ │ -rw-r--r-- 0 root (0) root (0) 78 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/index.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 7733 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/intro.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3489 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/intro.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 10774 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/license.html │ │ │ -rw-r--r-- 0 root (0) root (0) 454 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/license.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 3782 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/macros.def │ │ │ -rw-r--r-- 0 root (0) root (0) 5088 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/macros.html │ │ │ -rw-r--r-- 0 root (0) root (0) 388 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/macros.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 14028 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/metatag.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15002 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/metatag.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2439 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/metatag.htp.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 8471 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/opt.html │ │ │ -rw-r--r-- 0 root (0) root (0) 608 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/opt.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 7809 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/options.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3100 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/options.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 8130 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/output.html │ │ │ -rw-r--r-- 0 root (0) root (0) 695 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/output.htp │ │ │ @@ -82,15 +82,15 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 491 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/pic/manual.png │ │ │ -rw-r--r-- 0 root (0) root (0) 1313 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/pic/poweredbyhtp.png │ │ │ -rw-r--r-- 0 root (0) root (0) 679 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/pic/sficon.png │ │ │ -rw-r--r-- 0 root (0) root (0) 492 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/pic/source.png │ │ │ -rw-r--r-- 0 root (0) root (0) 523 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/pphtp.pl │ │ │ -rw-r--r-- 0 root (0) root (0) 8577 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/quote.html │ │ │ -rw-r--r-- 0 root (0) root (0) 390 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/quote.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 9758 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/set.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10167 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/set.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1200 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/set.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 500 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/styles.css │ │ │ -rw-r--r-- 0 root (0) root (0) 27219 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/template.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2235 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/template.htp.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 1914 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/toc.def │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/tut/ │ │ │ -rw-r--r-- 0 root (0) root (0) 146 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/tut/footer.hti │ │ │ @@ -105,15 +105,15 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 191 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/tut/tut3.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 356 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/tut/tut3.htt │ │ │ -rw-r--r-- 0 root (0) root (0) 297 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/tut/tut4.htt │ │ │ -rw-r--r-- 0 root (0) root (0) 10517 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/tutorial.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3393 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/tutorial.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 9042 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/undef.html │ │ │ -rw-r--r-- 0 root (0) root (0) 460 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/undef.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 9160 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/unset.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10449 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/unset.html │ │ │ -rw-r--r-- 0 root (0) root (0) 658 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/unset.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 7681 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/usage.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2959 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/usage.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 12127 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/use.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3300 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/use.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 10282 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/while.html │ │ │ -rw-r--r-- 0 root (0) root (0) 938 2024-01-29 07:46:02.000000 ./usr/share/doc/htp/while.htp │ │ ├── ./usr/share/doc/htp/alttext.html │ │ │ @@ -131,17 +131,24 @@ │ │ │

│ │ │ When an IMG tag with a matching source is encountered, htp will add an ALT │ │ │ attribute only if one is not already present. This allows for ALT text to │ │ │ be overridden on specific images and default text on all others. │ │ │

│ │ │ For example: │ │ │

│ │ │ -<[ref]def name="tagname" [option="option1 [option2 ...]" ] [global] [expand]>
│ │ │ -<[ref]/def>
│ │ │ +  <[ref]blockdef name="section" option="title">
│ │ │ +   <h1><[ref]use title></h1>
│ │ │ +   <p class="section">
│ │ │ +     <[ref]use block>
│ │ │ +   </p>
│ │ │ +  <[ref]/blockdef>
│ │ │
│ │ │ +  <section title="My Section">
│ │ │ +    This is a fancy section.
│ │ │ +  </section>
│ │ │

│ │ │

│ │ │ An ALTTEXT tag with a name but no text attribute removes any ALT │ │ │ mapping for this image. Successing IMG tags with a matching SRC name are not │ │ │ changed. │ │ │

│ │ │ Since this is useful for an image used throughout a set of documents, │ │ │ ├── html2text {} │ │ │ │ @@ -14,23 +14,29 @@ │ │ │ │     _I_F comparisons. │ │ │ │     _I_N_C When an IMG tag with a matching source is │ │ │ │     _I_M_G encountered, htp will add an ALT attribute only if │ │ │ │     _I_M_A_G_E_U_R_L one is not already present. This allows for ALT │ │ │ │     _O_P_T text to be overridden on specific images and │ │ │ │     _O_U_T_P_U_T default text on all others. │ │ │ │     _Q_U_O_T_E For example: │ │ │ │ -    _S_E_T <_[_[_r_e_f_]_]_d_e_f name="tagname" [option="option1 │ │ │ │ -    _U_N_D_E_F [option2 ...]" ] [global] [expand]> │ │ │ │ -    _U_N_S_E_T <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ -    _U_S_E_,_ _$ │ │ │ │ -    _W_H_I_L_E An ALTTEXT tag with a name but no text attribute │ │ │ │ -    _<_!_-_-_- removes any ALT mapping for this image. Successing │ │ │ │ -  _H_i_s_t_o_r_y IMG tags with a matching SRC name are not changed. │ │ │ │ -  _W_i_s_h_ _l_i_s_t Since this is useful for an image used throughout a │ │ │ │ -  _B_u_g_s set of documents, ALTTEXT is most appropriate in an │ │ │ │ +    _S_E_T   <_[_[_r_e_f_]_]_b_l_o_c_k_d_e_f name="section" option="title"> │ │ │ │ +    _U_N_D_E_F    

<_[_[_r_e_f_]_]_u_s_e title>

│ │ │ │ +    _U_N_S_E_T    

│ │ │ │ +    _U_S_E_,_ _$      <_[_[_r_e_f_]_]_u_s_e block> │ │ │ │ +    _W_H_I_L_E    

│ │ │ │ +    _<_!_-_-_-   <_[_[_r_e_f_]_]_/_b_l_o_c_k_d_e_f> │ │ │ │ +  _H_i_s_t_o_r_y │ │ │ │ +  _W_i_s_h_ _l_i_s_t  
│ │ │ │ +  _B_u_g_s     This is a fancy section. │ │ │ │ +  
│ │ │ │ + An ALTTEXT tag with a name but no text attribute │ │ │ │ + removes any ALT mapping for this image. Successing │ │ │ │ + IMG tags with a matching SRC name are not changed. │ │ │ │ + Since this is useful for an image used throughout a │ │ │ │ + set of documents, ALTTEXT is most appropriate in an │ │ │ │ _i_n_c_l_u_d_e_ _f_i_l_e or a _d_e_f_a_u_l_t_ _f_i_l_e. │ │ │ │ In addition to ALTTEXT, htp can also automatically │ │ │ │ add WIDTH and HEIGHT attributes to _I_M_G tags. │ │ ├── ./usr/share/doc/htp/block.html │ │ │ @@ -114,18 +114,24 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -<[ref]blockdef name="tagname" [option="option1 [option2 ...]" ] [global] [expand]>
│ │ │ -  ... <[ref]use block> ...
│ │ │ -<[ref]/blockdef>
│ │ │ +  <[ref]alttext name="logo.gif" text="Company logo">
│ │ │
│ │ │ +  this line: <[ref]img src="logo.gif">
│ │ │ +  becomes this after processing: <[ref]img src="logo.gif" alt="Company logo">
│ │ │ +
│ │ │ +  this line: <[ref]img src="../image/logo.gif">
│ │ │ +  will also have an ALT attribute appended to it
│ │ │ +
│ │ │ +  this line: <[ref]img src="logo.gif" alt="Click here for more information!">
│ │ │ +  remains unchanged.
│ │ │

│ │ │

synopsis

│ │ │

│ │ │ BLOCK and /BLOCK are used to create block macros, which │ │ │ are similar in use to SET macros, but can be │ │ │ multi-line definitions. │ │ │

│ │ │ ├── html2text {} │ │ │ │ @@ -1,43 +1,51 @@ │ │ │ │ [HTP] │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: BBLLOOCCKK,, //BBLLOOCCKK ************ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_b_l_o_c_k_d_e_f name="tagname" [option="option1 │ │ │ │ -  _L_i_c_e_n_s_e [option2 ...]" ] [global] [expand]> │ │ │ │ -  _T_u_t_o_r_i_a_l   ... <_[_[_r_e_f_]_]_u_s_e block> ... │ │ │ │ -  _U_s_a_g_e <_[_[_r_e_f_]_]_/_b_l_o_c_k_d_e_f> │ │ │ │ -  HTP Tags │ │ │ │ -    _A_L_T_T_E_X_T ********** ssyynnooppssiiss ********** │ │ │ │ -  [>] _B_L_O_C_K BBLLOOCCKK aanndd //BBLLOOCCKK are used to create block macros, │ │ │ │ -    _B_L_O_C_K_D_E_F which are similar in use to _S_E_T macros, but can be │ │ │ │ -    _D_E_F multi-line definitions. │ │ │ │ -    _F_I_L_E Any text and formatting may be set inside the │ │ │ │ -    _I_F block. You can use any htp or user defined metatag │ │ │ │ -    _I_N_C including _F_I_L_E_ _I_N_C_L_U_D_E. The metatags won't be │ │ │ │ -    _I_M_G expanded before the block is USEd except if you │ │ │ │ -    _I_M_A_G_E_U_R_L give the _E_X_P_A_N_D parameter. │ │ │ │ -    _O_P_T The block macro is dereferenced (expanded) with the │ │ │ │ -    _O_U_T_P_U_T _U_S_E_ _t_a_g_ _o_r_ _t_h_e_ _'_$_'_ _o_p_e_r_a_t_o_r. See the notes on the │ │ │ │ -    _Q_U_O_T_E _U_S_E tag on how to pass parameters to a block macro. │ │ │ │ -    _S_E_T │ │ │ │ -    _U_N_D_E_F │ │ │ │ -    _U_N_S_E_T │ │ │ │ -    _U_S_E_,_ _$ │ │ │ │ -    _W_H_I_L_E │ │ │ │ -    _<_!_-_-_- │ │ │ │ -  _H_i_s_t_o_r_y │ │ │ │ -  _W_i_s_h_ _l_i_s_t │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n   <_[_[_r_e_f_]_]_a_l_t_t_e_x_t name="logo.gif" text="Company │ │ │ │ +  _L_i_c_e_n_s_e logo"> │ │ │ │ +  _T_u_t_o_r_i_a_l │ │ │ │ +  _U_s_a_g_e   this line: <_[_[_r_e_f_]_]_i_m_g src="logo.gif"> │ │ │ │ +  HTP Tags   becomes this after processing: <_[_[_r_e_f_]_]_i_m_g │ │ │ │ +    _A_L_T_T_E_X_T src="logo.gif" alt="Company logo"> │ │ │ │ +  [>] _B_L_O_C_K │ │ │ │ +    _B_L_O_C_K_D_E_F   this line: <_[_[_r_e_f_]_]_i_m_g src="../image/logo.gif"> │ │ │ │ +    _D_E_F   will also have an ALT attribute appended to it │ │ │ │ +    _F_I_L_E │ │ │ │ +    _I_F   this line: <_[_[_r_e_f_]_]_i_m_g src="logo.gif" alt="Click │ │ │ │ +    _I_N_C here for more information!"> │ │ │ │ +    _I_M_G   remains unchanged. │ │ │ │ +    _I_M_A_G_E_U_R_L ********** ssyynnooppssiiss ********** │ │ │ │ +    _O_P_T BBLLOOCCKK aanndd //BBLLOOCCKK are used to create block macros, │ │ │ │ +    _O_U_T_P_U_T which are similar in use to _S_E_T macros, but can be │ │ │ │ +    _Q_U_O_T_E multi-line definitions. │ │ │ │ +    _S_E_T Any text and formatting may be set inside the │ │ │ │ +    _U_N_D_E_F block. You can use any htp or user defined metatag │ │ │ │ +    _U_N_S_E_T including _F_I_L_E_ _I_N_C_L_U_D_E. The metatags won't be │ │ │ │ +    _U_S_E_,_ _$ expanded before the block is USEd except if you │ │ │ │ +    _W_H_I_L_E give the _E_X_P_A_N_D parameter. │ │ │ │ +    _<_!_-_-_- The block macro is dereferenced (expanded) with the │ │ │ │ +  _H_i_s_t_o_r_y _U_S_E_ _t_a_g_ _o_r_ _t_h_e_ _'_$_'_ _o_p_e_r_a_t_o_r. See the notes on the │ │ │ │ +  _W_i_s_h_ _l_i_s_t _U_S_E tag on how to pass parameters to a block macro. │ │ │ │   _B_u_g_s │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │   _p_a_g_e_ _s_o_u_r_c_e │ │ │ │   _h_t_p_ _p_r_o_j_e_c_t │ │ │ │   _h_t_p_ _h_o_m_e_p_a_g_e │ │ ├── ./usr/share/doc/htp/blockdef.html │ │ │ @@ -114,27 +114,38 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -<!--- comment --->
│ │ │ +  <[ref]alttext name="logo.gif" text="Company logo">
│ │ │
│ │ │ +  this line: <[ref]img src="logo.gif">
│ │ │ +  becomes this after processing: <[ref]img src="logo.gif" alt="Company logo">
│ │ │ +
│ │ │ +  this line: <[ref]img src="../image/logo.gif">
│ │ │ +  will also have an ALT attribute appended to it
│ │ │ +
│ │ │ +  this line: <[ref]img src="logo.gif" alt="Click here for more information!">
│ │ │ +  remains unchanged.
│ │ │

│ │ │

synopsis

│ │ │ BLOCKDEF creates block metatags, which is a fancy way of saying it │ │ │ creates new block tags. A block tag is a tag that takes a whole block │ │ │ as additional parameter. This block is surrounded by <tagname> and │ │ │ </tagname>. The contents of this block are automatically stored │ │ │ in the block macro named BLOCK. │ │ │

For example:

│ │ │

│ │ │ <!--- This comment doesn't appear in the HTML file --->
│ │ │ +obal] [expand]>
│ │ │ +<[ref]/def>
│ │ │ +
│ │ │

│ │ │

│ │ │ All block metatags have the implicit option EXPAND, which tells htp to expand the contents │ │ │ of the block before the definition is expanded. │ │ │

│ │ │

│ │ │ ├── html2text {} │ │ │ │ @@ -1,36 +1,50 @@ │ │ │ │ [HTP] │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: BBLLOOCCKKDDEEFF,, //BBLLOOCCKKDDEEFF ************ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n │ │ │ │ -  _L_i_c_e_n_s_e │ │ │ │ -  _T_u_t_o_r_i_a_l ********** ssyynnooppssiiss ********** │ │ │ │ -  _U_s_a_g_e BBLLOOCCKKDDEEFF creates block _m_e_t_a_t_a_g_s, which is a fancy │ │ │ │ -  HTP Tags way of saying it creates new block tags. A block │ │ │ │ -    _A_L_T_T_E_X_T tag is a tag that takes a whole block as additional │ │ │ │ -    _B_L_O_C_K parameter. This block is surrounded by │ │ │ │ -  [>] _B_L_O_C_K_D_E_F and . The contents of this block are │ │ │ │ -    _D_E_F automatically stored in the block macro named │ │ │ │ -    _F_I_L_E BLOCK. │ │ │ │ -    _I_F For example: │ │ │ │ -    _I_N_C │ │ │ │ -    _I_M_A_G_E_U_R_L All block metatags have the implicit option _E_X_P_A_N_D, │ │ │ │ -    _O_P_T which tells htp to expand the contents of the block │ │ │ │ -    _O_U_T_P_U_T before the definition is expanded. │ │ │ │ -    _Q_U_O_T_E A more thorough discussion and more elaborate │ │ │ │ -    _S_E_T examples are discussed in the _m_e_t_a_t_a_g section. │ │ │ │ -    _U_N_D_E_F │ │ │ │ -    _U_N_S_E_T │ │ │ │ -    _U_S_E_,_ _$ │ │ │ │ -    _W_H_I_L_E │ │ │ │ -    _<_!_-_-_- │ │ │ │ -  _H_i_s_t_o_r_y │ │ │ │ -  _W_i_s_h_ _l_i_s_t │ │ │ │ -  _B_u_g_s │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n   <_[_[_r_e_f_]_]_a_l_t_t_e_x_t name="logo.gif" text="Company │ │ │ │ +  _L_i_c_e_n_s_e logo"> │ │ │ │ +  _T_u_t_o_r_i_a_l │ │ │ │ +  _U_s_a_g_e   this line: <_[_[_r_e_f_]_]_i_m_g src="logo.gif"> │ │ │ │ +  HTP Tags   becomes this after processing: <_[_[_r_e_f_]_]_i_m_g │ │ │ │ +    _A_L_T_T_E_X_T src="logo.gif" alt="Company logo"> │ │ │ │ +    _B_L_O_C_K │ │ │ │ +  [>] _B_L_O_C_K_D_E_F   this line: <_[_[_r_e_f_]_]_i_m_g src="../image/logo.gif"> │ │ │ │ +    _D_E_F   will also have an ALT attribute appended to it │ │ │ │ +    _F_I_L_E │ │ │ │ +    _I_F   this line: <_[_[_r_e_f_]_]_i_m_g src="logo.gif" alt="Click │ │ │ │ +    _I_N_C here for more information!"> │ │ │ │ +    _I_M_G   remains unchanged. │ │ │ │ +    _I_M_A_G_E_U_R_L ********** ssyynnooppssiiss ********** │ │ │ │ +    _O_P_T BBLLOOCCKKDDEEFF creates block _m_e_t_a_t_a_g_s, which is a fancy │ │ │ │ +    _O_U_T_P_U_T way of saying it creates new block tags. A block │ │ │ │ +    _Q_U_O_T_E tag is a tag that takes a whole block as additional │ │ │ │ +    _S_E_T parameter. This block is surrounded by │ │ │ │ +    _U_N_D_E_F and . The contents of this block are │ │ │ │ +    _U_N_S_E_T automatically stored in the block macro named │ │ │ │ +    _U_S_E_,_ _$ BLOCK. │ │ │ │ +    _W_H_I_L_E For example: │ │ │ │ +    _<_!_-_-_- │ │ │ │ +  _W_i_s_h_ _l_i_s_t obal] [expand]> │ │ │ │ +  _B_u_g_s <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ + │ │ │ │ + All block metatags have the implicit option _E_X_P_A_N_D, │ │ │ │ + which tells htp to expand the contents of the block │ │ │ │ + before the definition is expanded. │ │ │ │ + A more thorough discussion and more elaborate │ │ │ │ + examples are discussed in the _m_e_t_a_t_a_g section. │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ ├── ./usr/share/doc/htp/comment.html │ │ │ @@ -114,31 +114,35 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -<[ref]def name="tagname" [option="option1 [option2 ...]" ] [global] [expand]>
│ │ │ -<[ref]/def>
│ │ │ +  <[ref]blockdef name="section" option="title">
│ │ │ +   <h1><[ref]use title></h1>
│ │ │ +   <p class="section">
│ │ │ +     <[ref]use block>
│ │ │ +   </p>
│ │ │ +  <[ref]/blockdef>
│ │ │
│ │ │ +  <section title="My Section">
│ │ │ +    This is a fancy section.
│ │ │ +  </section>
│ │ │

│ │ │

synopsis

│ │ │

│ │ │ This is a simple comment that is not included in the output. This is useful │ │ │ when commenting metatags, since the metatags do not appear the output either. │ │ │ Example: │ │ │

│ │ │

│ │ │ -    <[ref]def name="centered">
│ │ │ -    <p align=center>
│ │ │ -    <[ref]/def>
│ │ │ +<[ref]def name="tagname" [option="option1 [option2 ...]" ] [global] [expand]>
│ │ │ +<[ref]/def>
│ │ │
│ │ │ -    <centered>
│ │ │ -    This text is centered.
│ │ │

│ │ │

│ │ │ Note that these comments should not include < or >, that is you │ │ │ should not use it to comment out htp code. For that purpose use something │ │ │ like this: │ │ │

│ │ │

│ │ │ ├── html2text {} │ │ │ │ @@ -1,36 +1,40 @@ │ │ │ │ [HTP] │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: < │ │ │ │ -  _T_u_t_o_r_i_a_l <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ -  _U_s_a_g_e │ │ │ │ -  HTP Tags ********** ssyynnooppssiiss ********** │ │ │ │ -    _A_L_T_T_E_X_T This is a simple comment that is not included in │ │ │ │ -    _B_L_O_C_K the output. This is useful when commenting │ │ │ │ -    _B_L_O_C_K_D_E_F metatags, since the metatags do not appear the │ │ │ │ -    _D_E_F output either. Example: │ │ │ │ -    _F_I_L_E     <_[_[_r_e_f_]_]_d_e_f name="centered"> │ │ │ │ -    _I_F    

│ │ │ │ -    _I_N_C     <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ -    _I_M_G │ │ │ │ -    _I_M_A_G_E_U_R_L     │ │ │ │ -    _O_P_T     This text is centered. │ │ │ │ -    _O_U_T_P_U_T Note that these comments should not include < or >, │ │ │ │ -    _Q_U_O_T_E that is you should not use it to comment out htp │ │ │ │ -    _S_E_T code. For that purpose use something like this: │ │ │ │ -    _U_N_D_E_F <_[_[_r_e_f_]_]_f_i_l_e execute="command-line" │ │ │ │ -    _U_N_S_E_T (output="filename" | redirect) [noerror]> │ │ │ │ -    _U_S_E_,_ _$ <_[_[_r_e_f_]_]_f_i_l_e include="includefilename" [parameters │ │ │ │ -    _W_H_I_L_E ...]> │ │ │ │ -  [>] _<_!_-_-_- <_[_[_r_e_f_]_]_f_i_l_e name> │ │ │ │ -  _H_i_s_t_o_r_y <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] size[ = │ │ │ │ -  _W_i_s_h_ _l_i_s_t (byte|kbyte|mbyte|gbyte) ] [precision=n]> │ │ │ │ -  _B_u_g_s <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] time[ ="format" ]> │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n   <_[_[_r_e_f_]_]_b_l_o_c_k_d_e_f name="section" option="title"> │ │ │ │ +  _L_i_c_e_n_s_e    

<_[_[_r_e_f_]_]_u_s_e title>

│ │ │ │ +  _T_u_t_o_r_i_a_l    

│ │ │ │ +  _U_s_a_g_e      <_[_[_r_e_f_]_]_u_s_e block> │ │ │ │ +  HTP Tags    

│ │ │ │ +    _A_L_T_T_E_X_T   <_[_[_r_e_f_]_]_/_b_l_o_c_k_d_e_f> │ │ │ │ +    _B_L_O_C_K │ │ │ │ +    _B_L_O_C_K_D_E_F  
│ │ │ │ +    _D_E_F     This is a fancy section. │ │ │ │ +    _F_I_L_E  
│ │ │ │ +    _I_F ********** ssyynnooppssiiss ********** │ │ │ │ +    _I_N_C This is a simple comment that is not included in │ │ │ │ +    _I_M_G the output. This is useful when commenting │ │ │ │ +    _I_M_A_G_E_U_R_L metatags, since the metatags do not appear the │ │ │ │ +    _O_P_T output either. Example: │ │ │ │ +    _O_U_T_P_U_T <_[_[_r_e_f_]_]_d_e_f name="tagname" [option="option1 │ │ │ │ +    _Q_U_O_T_E [option2 ...]" ] [global] [expand]> │ │ │ │ +    _S_E_T <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ +    _U_N_D_E_F │ │ │ │ +    _U_N_S_E_T Note that these comments should not include < or >, │ │ │ │ +    _U_S_E_,_ _$ that is you should not use it to comment out htp │ │ │ │ +    _W_H_I_L_E code. For that purpose use something like this: │ │ │ │ +  [>] _<_!_-_-_- <_[_[_r_e_f_]_]_f_i_l_e execute="command-line" │ │ │ │ +  _H_i_s_t_o_r_y (output="filename" | redirect) [noerror]> │ │ │ │ +  _W_i_s_h_ _l_i_s_t <_[_[_r_e_f_]_]_f_i_l_e include="includefilename" [parameters │ │ │ │ +  _B_u_g_s ...]> │ │ │ │ + <_[_[_r_e_f_]_]_f_i_l_e name> │ │ │ │ + <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] size[ = │ │ │ │ + (byte|kbyte|mbyte|gbyte) ] [precision=n]> │ │ │ │ + <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] time[ ="format" ]> │ │ │ │ <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] date[ ="format" ]> │ │ │ │ <_[_[_r_e_f_]_]_f_i_l_e search="searchpath"> │ │ │ │ <_[_[_r_e_f_]_]_f_i_l_e template="templatefilename"> │ │ │ │ │ │ │ │ Make sure that the variable is never defined and │ │ │ │ xyz should be the reason why you don't want to │ │ │ │ include this block │ │ ├── ./usr/share/doc/htp/def.html │ │ │ @@ -114,75 +114,86 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -<!--- This comment doesn't appear in the HTML file --->
│ │ │ +<[ref]def name="tagname" [option="option1 [option2 ...]" ] [global] [expand]>
│ │ │ +<[ref]/def>
│ │ │ +
│ │ │

│ │ │

synopsis

│ │ │

│ │ │ DEF creates metatags, which is a │ │ │ fancy way of saying it creates new tags. The mechanism is very similar to │ │ │ BLOCK macros, except that the USE │ │ │ tag is not used to expand them. Instead, they are expanded by their own name. │ │ │ For example: │ │ │

│ │ │

│ │ │ -  <[ref]set time="0">
│ │ │ -  <[ref]block name=a>
│ │ │ -    a is expanded at time <[ref]use time>.
│ │ │ -  <[ref]/block>
│ │ │ -  <[ref]block name=b expand>
│ │ │ -    b is expanded at time <[ref]use time>.
│ │ │ -  <[ref]/block>
│ │ │ -  <[ref]set time="1">
│ │ │ -  <[ref]use a>
│ │ │ -  <[ref]use b>
│ │ │ -  contents of a: <[ref]use a noexpand>
│ │ │ -  contents of b: <[ref]use b noexpand>
│ │ │ -  <[ref]block name=c expand>
│ │ │ -    c is expanded at time <[ref]use time>; <[ref]use a>
│ │ │ -  <[ref]/block>
│ │ │ -  <[ref]block name=d expand>
│ │ │ -    d is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ -  <[ref]/block>
│ │ │ -  <[ref]block name=e>
│ │ │ -    e is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ -  <[ref]/block>
│ │ │ -  <[ref]set time="2">
│ │ │ -  <[ref]block name=a>
│ │ │ -    a is defined for the 2nd time <[ref]use time>.
│ │ │ -  <[ref]/block>
│ │ │ -  <[ref]use c>
│ │ │ -  <[ref]use d>
│ │ │ -  <[ref]use e>
│ │ │ +<[ref]file execute="command-line" (output="filename" | redirect) [noerror]>
│ │ │ +<[ref]file include="includefilename" [parameters ...]>
│ │ │ +<[ref]file name>
│ │ │ +<[ref]file [ name="filename" ] size[ = (byte|kbyte|mbyte|gbyte) ] [precision=n]>
│ │ │ +<[ref]file [ name="filename" ] time[ ="format" ]>
│ │ │ +<[ref]file [ name="filename" ] date[ ="format" ]>
│ │ │ +<[ref]file search="searchpath">
│ │ │ +<[ref]file template="templatefilename">
│ │ │ +
│ │ │

│ │ │

│ │ │ Some metatags will require an opening and closing tag (comparable to │ │ │ and ). In this case, you should use the BLOCKDEF macro. Another slightly faster │ │ │ alternative is to use two metatags, the opening tag and the closing │ │ │ tag with a preceding slash. For example: │ │ │

│ │ │

│ │ │ -    <EM>File "<[ref]FILE NAME>" last updated <[ref]FILE TIME>, <[ref]FILE DATE></EM>
│ │ │ +    a is expanded at time 1.
│ │ │ +    b is expanded at time 0.
│ │ │ +  contents of a:   a is expanded at time <[ref]use time>.
│ │ │ +  contents of b:   b is expanded at time 0.
│ │ │ +    c is expanded at time 1;   a is expanded at time 1.
│ │ │ +    d is expanded at time 1;   a is expanded at time 2.
│ │ │ +    e is expanded at time 2;   a is defined for the 2nd time <[ref]use time>.
│ │ │

│ │ │

You should really use BLOCKDEF, though, │ │ │ as it will check for matching end tag. It is not that slower.

│ │ │

│ │ │ Options can be passed to a metatag, which can then expand as if it were │ │ │ a SET macro. Option names are parameterized with │ │ │ the OPTION attribute. Multiple options can be listed by separating their │ │ │ name with a space (which therefore requires they be surrounded by quotes.) │ │ │

│ │ │

│ │ │ -<[ref]img src="filename" ...>
│ │ │ +  <[ref]DEF NAME="HEADERIMG" OPTION="SRC TITLE SIZE">
│ │ │ +    <[ref]IF size>
│ │ │ +        <FONT SIZE=${size}>
│ │ │ +    <[ref]/IF>
│ │ │ +    <[ref]IMG SRC=pics/${src}>
│ │ │ +    <[ref]USE title>
│ │ │ +    <[ref]IF size>
│ │ │ +        </FONT>
│ │ │ +    <[ref]/IF>
│ │ │ +  <[ref]/DEF>
│ │ │ +
│ │ │ +  <HEADERIMG SRC="logo.gif" SIZE="+2" TITLE="A title">
│ │ │ +
│ │ │ +  <HEADERIMG SRC="logo.gif" TITLE="Normal sized title">
│ │ │ +
│ │ │ +  This will fail:
│ │ │ +  <HEADERIMG SRC="logo.gif" ALT="Our logo" TITLE="Another title">
│ │ │
│ │ │ +  Instead, use * like this:
│ │ │ +  <[ref]DEF NAME="MYIMG" OPTION="SRC *">
│ │ │ +    <[ref]IMG SRC="pics/${src}" $*>
│ │ │ +  <[ref]/DEF>
│ │ │ +   
│ │ │ +  <MYIMG SRC="logo.gif" ALT="Our logo">
│ │ │

│ │ │

│ │ │ htp will do very specific checking of parameters when a metatag is │ │ │ invoked. htp assumes that all parameter options to the metatag are │ │ │ optional. This is why the HEADERIMG definition uses IF to verify the │ │ │ SIZE option is defined before expanding it in the block. If a │ │ │ parameter is required, simply expand it without first checking. When │ │ │ ├── html2text {} │ │ │ │ @@ -1,69 +1,86 @@ │ │ │ │ [HTP] │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: DDEEFF,, //DDEEFF ************ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n │ │ │ │ -  _T_u_t_o_r_i_a_l ********** ssyynnooppssiiss ********** │ │ │ │ -  _U_s_a_g_e DDEEFF creates _m_e_t_a_t_a_g_s, which is a fancy way of │ │ │ │ -  HTP Tags saying it creates new tags. The mechanism is very │ │ │ │ -    _A_L_T_T_E_X_T similar to _B_L_O_C_K macros, except that the _U_S_E tag is │ │ │ │ -    _B_L_O_C_K not used to expand them. Instead, they are expanded │ │ │ │ -    _B_L_O_C_K_D_E_F by their own name. For example: │ │ │ │ -  [>] _D_E_F   <_[_[_r_e_f_]_]_s_e_t time="0"> │ │ │ │ -    _F_I_L_E   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ -    _I_F     a is expanded at time <_[_[_r_e_f_]_]_u_s_e time>. │ │ │ │ -    _I_N_C   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ -    _I_M_G   <_[_[_r_e_f_]_]_b_l_o_c_k name=b expand> │ │ │ │ -    _I_M_A_G_E_U_R_L     b is expanded at time <_[_[_r_e_f_]_]_u_s_e time>. │ │ │ │ -    _O_P_T   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ -    _O_U_T_P_U_T   <_[_[_r_e_f_]_]_s_e_t time="1"> │ │ │ │ -    _Q_U_O_T_E   <_[_[_r_e_f_]_]_u_s_e a> │ │ │ │ -    _S_E_T   <_[_[_r_e_f_]_]_u_s_e b> │ │ │ │ -    _U_N_D_E_F   contents of a: <_[_[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ -    _U_N_S_E_T   contents of b: <_[_[_r_e_f_]_]_u_s_e b noexpand> │ │ │ │ -    _U_S_E_,_ _$   <_[_[_r_e_f_]_]_b_l_o_c_k name=c expand> │ │ │ │ -    _W_H_I_L_E     c is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ -    _<_!_-_-_- _[_r_e_f_]_]_u_s_e a> │ │ │ │ -  _H_i_s_t_o_r_y   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ -  _W_i_s_h_ _l_i_s_t   <_[_[_r_e_f_]_]_b_l_o_c_k name=d expand> │ │ │ │ -  _B_u_g_s     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ - _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ -   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ -   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ -     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ - _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ -   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ -   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ -   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ -     a is defined for the 2nd time <_[_[_r_e_f_]_]_u_s_e │ │ │ │ - time>. │ │ │ │ -   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ -   <_[_[_r_e_f_]_]_u_s_e c> │ │ │ │ -   <_[_[_r_e_f_]_]_u_s_e d> │ │ │ │ -   <_[_[_r_e_f_]_]_u_s_e e> │ │ │ │ - Some metatags will require an opening and closing │ │ │ │ - tag (comparable to │ │ │ │ - and │ │ │ │ - ). In this case, you should use the _B_L_O_C_K_D_E_F macro. │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_d_e_f name="tagname" [option="option1 │ │ │ │ +  _L_i_c_e_n_s_e [option2 ...]" ] [global] [expand]> │ │ │ │ +  _T_u_t_o_r_i_a_l <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ +  _U_s_a_g_e │ │ │ │ +  HTP Tags ********** ssyynnooppssiiss ********** │ │ │ │ +    _A_L_T_T_E_X_T DDEEFF creates _m_e_t_a_t_a_g_s, which is a fancy way of │ │ │ │ +    _B_L_O_C_K saying it creates new tags. The mechanism is very │ │ │ │ +    _B_L_O_C_K_D_E_F similar to _B_L_O_C_K macros, except that the _U_S_E tag is │ │ │ │ +  [>] _D_E_F not used to expand them. Instead, they are expanded │ │ │ │ +    _F_I_L_E by their own name. For example: │ │ │ │ +    _I_F <_[_[_r_e_f_]_]_f_i_l_e execute="command-line" │ │ │ │ +    _I_N_C (output="filename" | redirect) [noerror]> │ │ │ │ +    _I_M_G <_[_[_r_e_f_]_]_f_i_l_e include="includefilename" [parameters │ │ │ │ +    _I_M_A_G_E_U_R_L ...]> │ │ │ │ +    _O_P_T <_[_[_r_e_f_]_]_f_i_l_e name> │ │ │ │ +    _O_U_T_P_U_T <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] size[ = │ │ │ │ +    _Q_U_O_T_E (byte|kbyte|mbyte|gbyte) ] [precision=n]> │ │ │ │ +    _S_E_T <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] time[ ="format" ]> │ │ │ │ +    _U_N_D_E_F <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] date[ ="format" ]> │ │ │ │ +    _U_N_S_E_T <_[_[_r_e_f_]_]_f_i_l_e search="searchpath"> │ │ │ │ +    _U_S_E_,_ _$ <_[_[_r_e_f_]_]_f_i_l_e template="templatefilename"> │ │ │ │ +    _W_H_I_L_E │ │ │ │ +    _<_!_-_-_- Some metatags will require an opening and closing │ │ │ │ +  _H_i_s_t_o_r_y tag (comparable to │ │ │ │ +  _W_i_s_h_ _l_i_s_t and │ │ │ │ +  _B_u_g_s ). In this case, you should use the _B_L_O_C_K_D_E_F macro. │ │ │ │ Another slightly faster alternative is to use two │ │ │ │ metatags, the opening tag and the closing tag with │ │ │ │ a preceding slash. For example: │ │ │ │ -     File "<_[_[_r_e_f_]_]_F_I_L_E NAME>" last updated <_[ │ │ │ │ - _[_r_e_f_]_]_F_I_L_E TIME>, <_[_[_r_e_f_]_]_F_I_L_E DATE> │ │ │ │ +     a is expanded at time 1. │ │ │ │ +     b is expanded at time 0. │ │ │ │ +   contents of a:   a is expanded at time <_[ │ │ │ │ + _[_r_e_f_]_]_u_s_e time>. │ │ │ │ +   contents of b:   b is expanded at time 0. │ │ │ │ +     c is expanded at time 1;   a is expanded at │ │ │ │ + time 1. │ │ │ │ +     d is expanded at time 1;   a is expanded at │ │ │ │ + time 2. │ │ │ │ +     e is expanded at time 2;   a is defined for the │ │ │ │ + 2nd time <_[_[_r_e_f_]_]_u_s_e time>. │ │ │ │ You should really use _B_L_O_C_K_D_E_F, though, as it will │ │ │ │ check for matching end tag. It is not that slower. │ │ │ │ Options can be passed to a metatag, which can then │ │ │ │ expand as if it were a _S_E_T macro. Option names are │ │ │ │ parameterized with the OPTION attribute. Multiple │ │ │ │ options can be listed by separating their name with │ │ │ │ a space (which therefore requires they be │ │ │ │ surrounded by quotes.) │ │ │ │ - <_[_[_r_e_f_]_]_i_m_g src="filename" ...> │ │ │ │ +   <_[_[_r_e_f_]_]_D_E_F NAME="HEADERIMG" OPTION="SRC TITLE │ │ │ │ + SIZE"> │ │ │ │ +     <_[_[_r_e_f_]_]_I_F size> │ │ │ │ +         │ │ │ │ +     <_[_[_r_e_f_]_]_/_I_F> │ │ │ │ +     <_[_[_r_e_f_]_]_I_M_G SRC=pics/${src}> │ │ │ │ +     <_[_[_r_e_f_]_]_U_S_E title> │ │ │ │ +     <_[_[_r_e_f_]_]_I_F size> │ │ │ │ +         │ │ │ │ +     <_[_[_r_e_f_]_]_/_I_F> │ │ │ │ +   <_[_[_r_e_f_]_]_/_D_E_F> │ │ │ │ │ │ │ │ +   │ │ │ │ + │ │ │ │ +   │ │ │ │ + │ │ │ │ +   This will fail: │ │ │ │ +   │ │ │ │ + │ │ │ │ +   Instead, use * like this: │ │ │ │ +   <_[_[_r_e_f_]_]_D_E_F NAME="MYIMG" OPTION="SRC *"> │ │ │ │ +     <_[_[_r_e_f_]_]_I_M_G SRC="pics/${src}" $*> │ │ │ │ +   <_[_[_r_e_f_]_]_/_D_E_F> │ │ │ │ +     │ │ │ │ +   │ │ │ │ htp will do very specific checking of parameters │ │ │ │ when a metatag is invoked. htp assumes that all │ │ │ │ parameter options to the metatag are optional. This │ │ │ │ is why the HEADERIMG definition uses IF to verify │ │ │ │ the SIZE option is defined before expanding it in │ │ │ │ the block. If a parameter is required, simply │ │ │ │ expand it without first checking. When htp expands │ │ ├── ./usr/share/doc/htp/expand.html │ │ │ @@ -98,27 +98,50 @@ │ │ │

However, if the block tag is marked with the expand │ │ │ modifier it is expanded immediately. This is useful if you want to │ │ │ store something in a block macro, that depends on the current value of │ │ │ another macro. This other macro may no longer have the correct value │ │ │ when the macro is expanded. Here is some code that demonstrate when │ │ │ the htp tags are expanded:

│ │ │

│ │ │ - 1. <[ref]file execute="command-line" (output="filename" | redirect) [noerror]>
│ │ │ - 2. <[ref]file include="includefilename" [parameters ...]>
│ │ │ - 3. <[ref]file name>
│ │ │ - 4. <[ref]file [ name="filename" ] size[ = (byte|kbyte|mbyte|gbyte) ] [precision=n]>
│ │ │ - 5. <[ref]file [ name="filename" ] time[ ="format" ]>
│ │ │ - 6. <[ref]file [ name="filename" ] date[ ="format" ]>
│ │ │ - 7. <[ref]file search="searchpath">
│ │ │ - 8. <[ref]file template="templatefilename">
│ │ │ - 9.
│ │ │ + 1.   <[ref]def name="bigfont">
│ │ │ + 2.     <font size="+4">
│ │ │ + 3.   <[ref]/def>
│ │ │ + 4.
│ │ │ + 5.   <[ref]def name="/bigfont">
│ │ │ + 6.     </font>
│ │ │ + 7.   <[ref]/def>
│ │ │ + 8.
│ │ │ + 9.   <bigfont>Some large text</bigfont>
│ │ │

│ │ │ This produces the following: │ │ │

│ │ │ -    <EM>File "<[ref]FILE NAME>" last updated <[ref]FILE TIME>, <[ref]FILE DATE></EM>
│ │ │ +  <[ref]DEF NAME="HEADERIMG" OPTION="SRC TITLE SIZE">
│ │ │ +    <[ref]IF size>
│ │ │ +        <FONT SIZE=${size}>
│ │ │ +    <[ref]/IF>
│ │ │ +    <[ref]IMG SRC=pics/${src}>
│ │ │ +    <[ref]USE title>
│ │ │ +    <[ref]IF size>
│ │ │ +        </FONT>
│ │ │ +    <[ref]/IF>
│ │ │ +  <[ref]/DEF>
│ │ │ +
│ │ │ +  <HEADERIMG SRC="logo.gif" SIZE="+2" TITLE="A title">
│ │ │ +
│ │ │ +  <HEADERIMG SRC="logo.gif" TITLE="Normal sized title">
│ │ │ +
│ │ │ +  This will fail:
│ │ │ +  <HEADERIMG SRC="logo.gif" ALT="Our logo" TITLE="Another title">
│ │ │ +
│ │ │ +  Instead, use * like this:
│ │ │ +  <[ref]DEF NAME="MYIMG" OPTION="SRC *">
│ │ │ +    <[ref]IMG SRC="pics/${src}" $*>
│ │ │ +  <[ref]/DEF>
│ │ │ +   
│ │ │ +  <MYIMG SRC="logo.gif" ALT="Our logo">
│ │ │

│ │ │

│ │ │ When block a and block b are defined in lines 2-7 the contents of a │ │ │ are taken literally, however, the contents for b are already expanded │ │ │ so the macro time is evaluated. So a is expanded when it │ │ │ is used, while the contents of b are already expanded. │ │ │

│ │ │ ├── html2text {} │ │ │ │ @@ -24,31 +24,52 @@ │ │ │ │ However, if the block tag is marked with the expand │ │ │ │ modifier it is expanded immediately. This is useful │ │ │ │ if you want to store something in a block macro, │ │ │ │ that depends on the current value of another macro. │ │ │ │ This other macro may no longer have the correct │ │ │ │ value when the macro is expanded. Here is some code │ │ │ │ that demonstrate when the htp tags are expanded: │ │ │ │ -  1. <_[_[_r_e_f_]_]_f_i_l_e execute="command-line" │ │ │ │ - (output="filename" | redirect) [noerror]> │ │ │ │ -  2. <_[_[_r_e_f_]_]_f_i_l_e include="includefilename" │ │ │ │ - [parameters ...]> │ │ │ │ -  3. <_[_[_r_e_f_]_]_f_i_l_e name> │ │ │ │ -  4. <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] size[ = │ │ │ │ - (byte|kbyte|mbyte|gbyte) ] [precision=n]> │ │ │ │ -  5. <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] time │ │ │ │ - [ ="format" ]> │ │ │ │ -  6. <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] date │ │ │ │ - [ ="format" ]> │ │ │ │ -  7. <_[_[_r_e_f_]_]_f_i_l_e search="searchpath"> │ │ │ │ -  8. <_[_[_r_e_f_]_]_f_i_l_e template="templatefilename"> │ │ │ │ -  9. │ │ │ │ +  1.   <_[_[_r_e_f_]_]_d_e_f name="bigfont"> │ │ │ │ +  2.     │ │ │ │ +  3.   <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ +  4. │ │ │ │ +  5.   <_[_[_r_e_f_]_]_d_e_f name="/bigfont"> │ │ │ │ +  6.     │ │ │ │ +  7.   <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ +  8. │ │ │ │ +  9.   Some large text │ │ │ │ This produces the following: │ │ │ │ -     File "<_[_[_r_e_f_]_]_F_I_L_E NAME>" last updated <_[ │ │ │ │ - _[_r_e_f_]_]_F_I_L_E TIME>, <_[_[_r_e_f_]_]_F_I_L_E DATE> │ │ │ │ +   <_[_[_r_e_f_]_]_D_E_F NAME="HEADERIMG" OPTION="SRC TITLE │ │ │ │ + SIZE"> │ │ │ │ +     <_[_[_r_e_f_]_]_I_F size> │ │ │ │ +         │ │ │ │ +     <_[_[_r_e_f_]_]_/_I_F> │ │ │ │ +     <_[_[_r_e_f_]_]_I_M_G SRC=pics/${src}> │ │ │ │ +     <_[_[_r_e_f_]_]_U_S_E title> │ │ │ │ +     <_[_[_r_e_f_]_]_I_F size> │ │ │ │ +         │ │ │ │ +     <_[_[_r_e_f_]_]_/_I_F> │ │ │ │ +   <_[_[_r_e_f_]_]_/_D_E_F> │ │ │ │ + │ │ │ │ +   │ │ │ │ + │ │ │ │ +   │ │ │ │ + │ │ │ │ +   This will fail: │ │ │ │ +   │ │ │ │ + │ │ │ │ +   Instead, use * like this: │ │ │ │ +   <_[_[_r_e_f_]_]_D_E_F NAME="MYIMG" OPTION="SRC *"> │ │ │ │ +     <_[_[_r_e_f_]_]_I_M_G SRC="pics/${src}" $*> │ │ │ │ +   <_[_[_r_e_f_]_]_/_D_E_F> │ │ │ │ +     │ │ │ │ +   │ │ │ │ When block a and block b are defined in lines 2- │ │ │ │ 7 the contents of a are taken literally, however, │ │ │ │ the contents for b are already expanded so the │ │ │ │ macro time is evaluated. So a is expanded when it │ │ │ │ is used, while the contents of b are already │ │ │ │ expanded. │ │ │ │ In line 10 and 12 the _[_[_r_e_f_]_]_u_s_e tag is used with │ │ ├── ./usr/share/doc/htp/file.html │ │ │ @@ -163,16 +163,15 @@ │ │ │

│ │ │

NAME, TIME, SIZE

│ │ │

│ │ │ To include information about another file, such as an archive file or │ │ │ graphic image, specify its name with the NAME attribute followed by the │ │ │ type of information to be displayed: │ │ │

│ │ │ -<[ref]img src="filename" ...>
│ │ │ -
│ │ │ +    <[ref]IF name="Jim">...<[ref]/IF>
│ │ │

│ │ │

│ │ │ For file size information, the value BYTE, KBYTE, etc. dictates how the │ │ │ information is displayed. In anything other than byte format, the information │ │ │ is displayed in floating-point notation. The amount of precision (the number │ │ │ of digits to the right of the decimal point) can be set with the optional │ │ │ PRECISION attribute. The default precision is zero (0), which means no │ │ │ @@ -201,16 +200,15 @@ │ │ │

│ │ │ Additional parameters can be set in the FILE INCLUDE tag, which are │ │ │ interpreted as macros that are "passed" to the included file. The macros │ │ │ are available only to the include file (and any macros or included files it │ │ │ holds). After the file is completely included, the macros are no longer │ │ │ available. So: │ │ │

│ │ │ -<[ref]imageurl url="imageurl" [ path="path/in/local/filesystem" ]>
│ │ │ -
│ │ │ +    <[ref]IF name>...<[ref]/IF>
│ │ │

│ │ │

│ │ │ Macros named "name" and "email" are set, and available inside the included │ │ │ file. They are not available, however, past the tag (which is why the │ │ │ second statement will fail.) │ │ │

│ │ │

TEMPLATE

│ │ │ ├── html2text {} │ │ │ │ @@ -50,16 +50,15 @@ │ │ │ │     │ │ │ │   │ │ │ │ ******** NNAAMMEE,, TTIIMMEE,, SSIIZZEE ******** │ │ │ │ To include information about another file, such as │ │ │ │ an archive file or graphic image, specify its name │ │ │ │ with the NAME attribute followed by the type of │ │ │ │ information to be displayed: │ │ │ │ - <_[_[_r_e_f_]_]_i_m_g src="filename" ...> │ │ │ │ - │ │ │ │ +     <_[_[_r_e_f_]_]_I_F name="Jim">...<_[_[_r_e_f_]_]_/_I_F> │ │ │ │ For file size information, the value BYTE, KBYTE, │ │ │ │ etc. dictates how the information is displayed. In │ │ │ │ anything other than byte format, the information is │ │ │ │ displayed in floating-point notation. The amount of │ │ │ │ precision (the number of digits to the right of the │ │ │ │ decimal point) can be set with the optional │ │ │ │ PRECISION attribute. The default precision is zero │ │ │ │ @@ -90,17 +89,15 @@ │ │ │ │ Additional parameters can be set in the FILE │ │ │ │ INCLUDE tag, which are interpreted as macros that │ │ │ │ are "passed" to the included file. The macros are │ │ │ │ available only to the include file (and any macros │ │ │ │ or included files it holds). After the file is │ │ │ │ completely included, the macros are no longer │ │ │ │ available. So: │ │ │ │ - <_[_[_r_e_f_]_]_i_m_a_g_e_u_r_l url="imageurl" [ path="path/in/ │ │ │ │ - local/filesystem" ]> │ │ │ │ - │ │ │ │ +     <_[_[_r_e_f_]_]_I_F name>...<_[_[_r_e_f_]_]_/_I_F> │ │ │ │ Macros named "name" and "email" are set, and │ │ │ │ available inside the included file. They are not │ │ │ │ available, however, past the tag (which is why the │ │ │ │ second statement will fail.) │ │ │ │ ******** TTEEMMPPLLAATTEE ******** │ │ │ │ A template file is nothing more than a default │ │ │ │ include file, one that is included once the input │ │ ├── ./usr/share/doc/htp/if.html │ │ │ @@ -114,48 +114,26 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -    <[ref]FILE INCLUDE="include.hti" name="Jim Nelson" email="jnelson@crl.com">
│ │ │ -    This tag will fail: <[ref]USE name>
│ │ │ +<[ref]img src="filename" ...>
│ │ │ +
│ │ │

│ │ │

synopsis

│ │ │ IF, NOT, ELSEIF, ELSE, and /IF are the building │ │ │ blocks for conditional processing. The basic form is shown above. │ │ │

"Conditional" is either a "compare" or "is defined" operation. A │ │ │ compare operator is a test of the value of a macro against a literal │ │ │ string: │ │ │

│ │ │ -<[ref]imageurl url="imageurl" [ path="path/in/local/filesystem" ]>
│ │ │ -
│ │ │ -n/">
│ │ │ -  <[ref]imageurl url="other.domain.org/" path="/var/www/other.domain/">
│ │ │ -
│ │ │ -  For this line: <[ref]img src="logo.gif">
│ │ │ -  the local filename "logo.gif" will be used to determine image dimensions
│ │ │ -  (no URL replacement).
│ │ │ -
│ │ │ -  For this line: <[ref]img src="http://my.domain.org/logo.gif">
│ │ │ -  the local filename "/var/www/my.domain/logo.gif" will be used.
│ │ │ -
│ │ │ -  But for this line: <[ref]img src="http://other.domain.org/logo.gif">
│ │ │ -  the local file cannot be found (no prefix match), so the image dimensions
│ │ │ -  will not be added.
│ │ │ -
│ │ │ -  Order is important; last IMAGEURL tag takes precedence:
│ │ │ -  <[ref]imageurl url="/" path="/var/www/htdocs/">
│ │ │ -  <[ref]imageurl url="/test/" path="/var/www/test/">
│ │ │ -
│ │ │ -  <[ref]img src="/image.gif"> and <[ref]img src="/test/image.gif"> are mapped to
│ │ │ -  /var/www/htdocs/image.gif and /var/www/test/image.gif, resp.
│ │ │ -  If the order of the imageurl lines would be swapped, the second
│ │ │ -  image would be mapped to /var/www/htdocs/test/image.gif.
│ │ │ +    <[ref]FILE INCLUDE="include.hti" name="Jim Nelson" email="jnelson@crl.com">
│ │ │ +    This tag will fail: <[ref]USE name>
│ │ │

│ │ │

│ │ │ and a defined operator is a test of a macro's existance: │ │ │

│ │ │

│ │ │ <[ref]INC macroname1="increment1" [macroname2="increment2" ... ] [GLOBAL]>
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,71 +1,36 @@ │ │ │ │ [HTP] │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: IIFF,, EELLSSEEIIFF,, EELLSSEE,, //IIFF ************ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n     <_[_[_r_e_f_]_]_F_I_L_E INCLUDE="include.hti" name="Jim │ │ │ │ -  _L_i_c_e_n_s_e Nelson" email="jnelson@crl.com"> │ │ │ │ -  _T_u_t_o_r_i_a_l     This tag will fail: <_[_[_r_e_f_]_]_U_S_E name> │ │ │ │ -  _U_s_a_g_e ********** ssyynnooppssiiss ********** │ │ │ │ -  HTP Tags IIFF,, NNOOTT,, EELLSSEEIIFF,, EELLSSEE,, aanndd //IIFF are the building │ │ │ │ -    _A_L_T_T_E_X_T blocks for conditional processing. The basic form │ │ │ │ -    _B_L_O_C_K is shown above. │ │ │ │ -    _B_L_O_C_K_D_E_F "Conditional" is either a "compare" or "is defined" │ │ │ │ -    _D_E_F operation. A compare operator is a test of the │ │ │ │ -    _F_I_L_E value of a macro against a literal string: │ │ │ │ -  [>] _I_F <_[_[_r_e_f_]_]_i_m_a_g_e_u_r_l url="imageurl" [ path="path/in/ │ │ │ │ -    _I_N_C local/filesystem" ]> │ │ │ │ -    _I_M_G │ │ │ │ -    _I_M_A_G_E_U_R_L n/"> │ │ │ │ -    _O_P_T   <_[_[_r_e_f_]_]_i_m_a_g_e_u_r_l url="other.domain.org/" path="/ │ │ │ │ -    _O_U_T_P_U_T var/www/other.domain/"> │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_i_m_g src="filename" ...> │ │ │ │ +  _L_i_c_e_n_s_e │ │ │ │ +  _T_u_t_o_r_i_a_l ********** ssyynnooppssiiss ********** │ │ │ │ +  _U_s_a_g_e IIFF,, NNOOTT,, EELLSSEEIIFF,, EELLSSEE,, aanndd //IIFF are the building │ │ │ │ +  HTP Tags blocks for conditional processing. The basic form │ │ │ │ +    _A_L_T_T_E_X_T is shown above. │ │ │ │ +    _B_L_O_C_K "Conditional" is either a "compare" or "is defined" │ │ │ │ +    _B_L_O_C_K_D_E_F operation. A compare operator is a test of the │ │ │ │ +    _D_E_F value of a macro against a literal string: │ │ │ │ +    _F_I_L_E     <_[_[_r_e_f_]_]_F_I_L_E INCLUDE="include.hti" name="Jim │ │ │ │ +  [>] _I_F Nelson" email="jnelson@crl.com"> │ │ │ │ +    _I_N_C     This tag will fail: <_[_[_r_e_f_]_]_U_S_E name> │ │ │ │ +    _I_M_G and a defined operator is a test of a macro's │ │ │ │ +    _I_M_A_G_E_U_R_L existance: │ │ │ │ +    _O_P_T <_[_[_r_e_f_]_]_I_N_C macroname1="increment1" │ │ │ │ +    _O_U_T_P_U_T [macroname2="increment2" ... ] [GLOBAL]> │ │ │ │     _Q_U_O_T_E │ │ │ │ -    _S_E_T   For this line: <_[_[_r_e_f_]_]_i_m_g src="logo.gif"> │ │ │ │ -    _U_N_D_E_F   the local filename "logo.gif" will be used to │ │ │ │ -    _U_N_S_E_T determine image dimensions │ │ │ │ -    _U_S_E_,_ _$   (no URL replacement). │ │ │ │ -    _W_H_I_L_E │ │ │ │ -    _<_!_-_-_-   For this line: <_[_[_r_e_f_]_]_i_m_g src="http:// │ │ │ │ -  _H_i_s_t_o_r_y my.domain.org/logo.gif"> │ │ │ │ -  _W_i_s_h_ _l_i_s_t   the local filename "/var/www/my.domain/logo.gif" │ │ │ │ -  _B_u_g_s will be used. │ │ │ │ - │ │ │ │ -   But for this line: <_[_[_r_e_f_]_]_i_m_g src="http:// │ │ │ │ - other.domain.org/logo.gif"> │ │ │ │ -   the local file cannot be found (no prefix match), │ │ │ │ - so the image dimensions │ │ │ │ -   will not be added. │ │ │ │ - │ │ │ │ -   Order is important; last IMAGEURL tag takes │ │ │ │ - precedence: │ │ │ │ -   <_[_[_r_e_f_]_]_i_m_a_g_e_u_r_l url="/" path="/var/www/htdocs/"> │ │ │ │ -   <_[_[_r_e_f_]_]_i_m_a_g_e_u_r_l url="/test/" path="/var/www/ │ │ │ │ - test/"> │ │ │ │ - │ │ │ │ -   <_[_[_r_e_f_]_]_i_m_g src="/image.gif"> and <_[_[_r_e_f_]_]_i_m_g │ │ │ │ - src="/test/image.gif"> are mapped to │ │ │ │ -   /var/www/htdocs/image.gif and /var/www/test/ │ │ │ │ - image.gif, resp. │ │ │ │ -   If the order of the imageurl lines would be │ │ │ │ - swapped, the second │ │ │ │ -   image would be mapped to /var/www/htdocs/test/ │ │ │ │ - image.gif. │ │ │ │ - and a defined operator is a test of a macro's │ │ │ │ - existance: │ │ │ │ - <_[_[_r_e_f_]_]_I_N_C macroname1="increment1" │ │ │ │ - [macroname2="increment2" ... ] [GLOBAL]> │ │ │ │ - │ │ │ │ - If the NOT tag is present in the IF markup, the │ │ │ │ - evaluation of the conditional is reversed. The │ │ │ │ - first IF or ELSEIF condition that evaluates to true │ │ │ │ - is chosen. If none of the conditions is true the │ │ │ │ - ELSE block is taken if it is present. A conditional │ │ │ │ - block mmuusstt be closed with the /IF tag. IF tags can │ │ │ │ - be nested. │ │ │ │ - │ │ │ │ - │ │ │ │ +    _S_E_T If the NOT tag is present in the IF markup, the │ │ │ │ +    _U_N_D_E_F evaluation of the conditional is reversed. The │ │ │ │ +    _U_N_S_E_T first IF or ELSEIF condition that evaluates to true │ │ │ │ +    _U_S_E_,_ _$ is chosen. If none of the conditions is true the │ │ │ │ +    _W_H_I_L_E ELSE block is taken if it is present. A conditional │ │ │ │ +    _<_!_-_-_- block mmuusstt be closed with the /IF tag. IF tags can │ │ │ │ +  _H_i_s_t_o_r_y be nested. │ │ │ │ +  _W_i_s_h_ _l_i_s_t │ │ │ │ +  _B_u_g_s │ │ ├── ./usr/share/doc/htp/imageurl.html │ │ │ @@ -114,16 +114,16 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -<[ref]imageurl url="imageurl" [ path="path/in/local/filesystem" ]>
│ │ │ -
│ │ │ +    <[ref]FILE INCLUDE="include.hti" name="Jim Nelson" email="jnelson@crl.com">
│ │ │ +    This tag will fail: <[ref]USE name>
│ │ │

│ │ │

synopsis

│ │ │

│ │ │ IMAGEURL tells htp, where to find images on the local │ │ │ file system. declares an URL replacement that is used for │ │ │ size lookups in any IMG tag. This definitions │ │ │ takes effect only if the IMGXY option is │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ [HTP] │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: IIMMAAGGEEUURRLL ************ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_i_m_a_g_e_u_r_l url="imageurl" [ path="path/in/ │ │ │ │ -  _L_i_c_e_n_s_e local/filesystem" ]> │ │ │ │ -  _T_u_t_o_r_i_a_l │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n     <_[_[_r_e_f_]_]_F_I_L_E INCLUDE="include.hti" name="Jim │ │ │ │ +  _L_i_c_e_n_s_e Nelson" email="jnelson@crl.com"> │ │ │ │ +  _T_u_t_o_r_i_a_l     This tag will fail: <_[_[_r_e_f_]_]_U_S_E name> │ │ │ │   _U_s_a_g_e ********** ssyynnooppssiiss ********** │ │ │ │   HTP Tags IIMMAAGGEEUURRLL tells htp, where to find images on the │ │ │ │     _A_L_T_T_E_X_T local file system. declares an URL replacement that │ │ │ │     _B_L_O_C_K is used for size lookups in any _I_M_G tag. This │ │ │ │     _B_L_O_C_K_D_E_F definitions takes effect only if the _I_M_G_X_Y option │ │ │ │     _D_E_F is enabled. Beacause htp can't lookup files in the │ │ │ │     _F_I_L_E world wide web you have to map absolute image URLs │ │ ├── ./usr/share/doc/htp/img.html │ │ │ @@ -114,16 +114,16 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -<[ref]imageurl url="imageurl" [ path="path/in/local/filesystem" ]>
│ │ │ -
│ │ │ +    <[ref]FILE INCLUDE="include.hti" name="Jim Nelson" email="jnelson@crl.com">
│ │ │ +    This tag will fail: <[ref]USE name>
│ │ │

│ │ │

synopsis

│ │ │

img is a standard HTML tag. htp can add the specified │ │ │ image's width and height to the tag automatically. This has the advantage │ │ │ of not having to determine each image's size manually, which is especially │ │ │ useful if the image may change frequently.

│ │ │

htp adds this information with the WIDTH and HEIGHT markup │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ [HTP] │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: IIMMGG ************ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_i_m_a_g_e_u_r_l url="imageurl" [ path="path/in/ │ │ │ │ -  _L_i_c_e_n_s_e local/filesystem" ]> │ │ │ │ -  _T_u_t_o_r_i_a_l │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n     <_[_[_r_e_f_]_]_F_I_L_E INCLUDE="include.hti" name="Jim │ │ │ │ +  _L_i_c_e_n_s_e Nelson" email="jnelson@crl.com"> │ │ │ │ +  _T_u_t_o_r_i_a_l     This tag will fail: <_[_[_r_e_f_]_]_U_S_E name> │ │ │ │   _U_s_a_g_e ********** ssyynnooppssiiss ********** │ │ │ │   HTP Tags iimmgg is a standard HTML tag. htp can add the │ │ │ │     _A_L_T_T_E_X_T specified image's width and height to the tag │ │ │ │     _B_L_O_C_K automatically. This has the advantage of not having │ │ │ │     _B_L_O_C_K_D_E_F to determine each image's size manually, which is │ │ │ │     _D_E_F especially useful if the image may change │ │ │ │     _F_I_L_E frequently. │ │ ├── ./usr/share/doc/htp/inc.html │ │ │ @@ -130,22 +130,27 @@ │ │ │ macroname must be the name of a defined macro that contains an │ │ │ integer. If the increment is ommitted it defaults to 1. │ │ │ The effect of this operation is that the macro is redefined │ │ │ to contain the sum of its previous value and its increment. │ │ │

│ │ │ To increment or decrement a variable you can use this form: │ │ │

│ │ │ -<[ref]OPT (IMGXY|NOIMGXY)>
│ │ │ -<[ref]OPT (QUIET|VERBOSE)>
│ │ │ -<[ref]OPT (DEPEND|NODEPEND)>
│ │ │ -<[ref]OPT (PRECIOUS|NOPRECIOUS)>
│ │ │ -<[ref]OPT (CONDENSE|SEMICONDENSE|NOCONDENSE)>
│ │ │ -<[ref]OPT DELIM=(HTML|SQUARE|CURLY)>
│ │ │ -<[ref]OPT (XML|XML=FALSE)>
│ │ │ + <[ref]def name="imghr">
│ │ │ +   <table border="0" cellspacing="0" cellpadding="0">
│ │ │ +   <tr>
│ │ │ +    <td width=10><[ref]img src="leftsep.png"></td>
│ │ │ +    <td width="95%" background="midsep.png">&nbsp;</td>
│ │ │ +    <td width=10><[ref]img src="rightsep.png"></td>
│ │ │ +   </tr>
│ │ │ +   </table>
│ │ │ + <[ref]/def>
│ │ │
│ │ │ + paragraph
│ │ │ + <imghr>
│ │ │ + paragraph
│ │ │

│ │ │

│ │ │ Note that INC doesn't check if the strings really denote integers. It │ │ │ may give weired results when used on arbitrary strings. The integer │ │ │ values are limited to the range -2^31..2^31. │ │ │

│ │ │ Note further that htp wasn't designed to do extensive calculations. │ │ │ ├── html2text {} │ │ │ │ @@ -14,23 +14,32 @@ │ │ │ │     _I_F be the name of a defined macro that contains an │ │ │ │   [>] _I_N_C integer. If the increment is ommitted it defaults │ │ │ │     _I_M_G to 1. The effect of this operation is that the │ │ │ │     _I_M_A_G_E_U_R_L macro is redefined to contain the sum of its │ │ │ │     _O_P_T previous value and its increment. │ │ │ │     _O_U_T_P_U_T To increment or decrement a variable you can use │ │ │ │     _Q_U_O_T_E this form: │ │ │ │ -    _S_E_T <_[_[_r_e_f_]_]_O_P_T (IMGXY|NOIMGXY)> │ │ │ │ -    _U_N_D_E_F <_[_[_r_e_f_]_]_O_P_T (QUIET|VERBOSE)> │ │ │ │ -    _U_N_S_E_T <_[_[_r_e_f_]_]_O_P_T (DEPEND|NODEPEND)> │ │ │ │ -    _U_S_E_,_ _$ <_[_[_r_e_f_]_]_O_P_T (PRECIOUS|NOPRECIOUS)> │ │ │ │ -    _W_H_I_L_E <_[_[_r_e_f_]_]_O_P_T (CONDENSE|SEMICONDENSE|NOCONDENSE)> │ │ │ │ -    _<_!_-_-_- <_[_[_r_e_f_]_]_O_P_T DELIM=(HTML|SQUARE|CURLY)> │ │ │ │ -  _H_i_s_t_o_r_y <_[_[_r_e_f_]_]_O_P_T (XML|XML=FALSE)> │ │ │ │ -  _W_i_s_h_ _l_i_s_t │ │ │ │ -  _B_u_g_s Note that INC doesn't check if the strings really │ │ │ │ +    _S_E_T  <_[_[_r_e_f_]_]_d_e_f name="imghr"> │ │ │ │ +    _U_N_D_E_F     │ │ │ │ +    _U_S_E_,_ _$     │ │ │ │ +    _W_H_I_L_E     │ │ │ │ +  _B_u_g_s     │ │ │ │ +    
<_[_[_r_e_f_]_]_i_m_g src="leftsep.png"> │ │ │ │ +  _H_i_s_t_o_r_y      <_[_[_r_e_f_]_]_i_m_g src="rightsep.png"> │ │ │ │ +    
│ │ │ │ +  <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ + │ │ │ │ +  paragraph │ │ │ │ +   │ │ │ │ +  paragraph │ │ │ │ + Note that INC doesn't check if the strings really │ │ │ │ denote integers. It may give weired results when │ │ │ │ used on arbitrary strings. The integer values are │ │ │ │ limited to the range -2^31..2^31. │ │ │ │ Note further that htp wasn't designed to do │ │ │ │ extensive calculations. The INC tag is useful in │ │ │ │ conjunction with WHILE to iterate over the defined │ │ │ │ blocks. │ │ ├── ./usr/share/doc/htp/metatag.html │ │ │ @@ -113,36 +113,35 @@ │ │ │ file.

│ │ │

Often you want to define tags that have an opening and a closing │ │ │ variant. For this purpose you should use the [ref]blockdef tag. When htp │ │ │ encounters a blockdef tag it will automatically search for the │ │ │ matching closing tag and put everything between these tags in a block │ │ │ macro named block. Here is an example for this.

│ │ │

│ │ │ - 1. <[ref]SET macroname1="macrovalue1" [macroname2="macrovalue2" ...] [GLOBAL]>
│ │ │ + 1. <[ref]QUOTE TAG [ATTRIBUTE=VALUE ...]>
│ │ │  2.
│ │ │

│ │ │

Using parameters

│ │ │

More sophisticated tags accept parameters. The │ │ │ option parameter lets multiple metatag parameters be │ │ │ named and expanded inside the def or │ │ │ blockdef block:

│ │ │

│ │ │ - 1.     <[ref]SET emailaddr="jnelson@crl.com">
│ │ │ + 1. <[ref]SET macroname1="macrovalue1" [macroname2="macrovalue2" ...] [GLOBAL]>
│ │ │ + 2.
│ │ │

│ │ │

Saving blocks for later

│ │ │

When you are using templates, the html should only be written by │ │ │ the template file. The normal htp files should just define macros │ │ │ that are used later in the template. So you may want to write block │ │ │ tags that just save the block in a macro for later use. Although this │ │ │ is possible with htp it is quite tricky, so here we present the way to │ │ │ do this:

│ │ │

│ │ │ - 1. <[ref]UNDEF tagname>
│ │ │ - 2. <[ref]UNDEF tagname1 tagname2 ... >
│ │ │ - 3.
│ │ │ + 1.     <[ref]SET emailaddr="jnelson@crl.com">
│ │ │

│ │ │

This defines a block macro named section. This macro uses a │ │ │ counter sect-ctr that enumerates the sections. It is │ │ │ increased for every section (line 3) and then the block macro name is │ │ │ build from this counter. So the first section is stored in block │ │ │ sect-1, the second in sect-2 and so on. The [ref]global flag │ │ │ in line 4 tells htp that these macros should be defined globally │ │ │ @@ -161,17 +160,21 @@ │ │ │ contents of block to be expanded twice. If you omit it, it would be │ │ │ expanded when defining the sect-1 macro and when using it later in the │ │ │ template. Generally it is a good idea to use noexpand whenever you │ │ │ use expand in a block around it.

│ │ │

To close this example we show how to expand the │ │ │ sect-${sect-ctr} blocks in the template:

│ │ │

│ │ │ - 1. <[ref]unset macroname>
│ │ │ - 2. <[ref]unset macroname1 macroname2 ... >
│ │ │ - 3.
│ │ │ + 1. <[ref]file include="header.hti">
│ │ │ + 2.   <[ref]set sect-ctr="1">
│ │ │ + 3.   <[ref]while sect-${sect-ctr}>
│ │ │ + 4.     <[ref]use sect-${sect-ctr}>
│ │ │ + 5.     <[ref]inc sect-ctr>
│ │ │ + 6.   <[ref]/while>
│ │ │ + 7. <[ref]file include="footer.hti">
│ │ │

│ │ │

│ │ │ The [ref]while tag in line 3 checks whether │ │ │ the macro sect-${sect-ctr} is defined. If it is defined the body is │ │ │ evaluated, which expands the macro and increases sect-ctr. Afterwards │ │ │ the while condition is checked again to check for sect-2 macro. This │ │ │ repeats until sect-${sect-ctr} is not defined. │ │ │ ├── html2text {} │ │ │ │ @@ -35,34 +35,33 @@ │ │ │ │ Often you want to define tags that have an opening │ │ │ │ and a closing variant. For this purpose you should │ │ │ │ use the _[_[_r_e_f_]_]_b_l_o_c_k_d_e_f tag. When htp encounters a │ │ │ │ blockdef tag it will automatically search for the │ │ │ │ matching closing tag and put everything between │ │ │ │ these tags in a block macro named block. Here is an │ │ │ │ example for this. │ │ │ │ -  1. <_[_[_r_e_f_]_]_S_E_T macroname1="macrovalue1" │ │ │ │ - [macroname2="macrovalue2" ...] [GLOBAL]> │ │ │ │ +  1. <_[_[_r_e_f_]_]_Q_U_O_T_E TAG [ATTRIBUTE=VALUE ...]> │ │ │ │  2. │ │ │ │ ********** UUssiinngg ppaarraammeetteerrss ********** │ │ │ │ More sophisticated tags accept parameters. The │ │ │ │ option parameter lets multiple metatag parameters │ │ │ │ be named and expanded inside the def or blockdef │ │ │ │ block: │ │ │ │ -  1.     <_[_[_r_e_f_]_]_S_E_T emailaddr="jnelson@crl.com"> │ │ │ │ +  1. <_[_[_r_e_f_]_]_S_E_T macroname1="macrovalue1" │ │ │ │ + [macroname2="macrovalue2" ...] [GLOBAL]> │ │ │ │ +  2. │ │ │ │ ********** SSaavviinngg bblloocckkss ffoorr llaatteerr ********** │ │ │ │ When you are using templates, the html should only │ │ │ │ be written by the template file. The normal htp │ │ │ │ files should just define macros that are used later │ │ │ │ in the template. So you may want to write block │ │ │ │ tags that just save the block in a macro for later │ │ │ │ use. Although this is possible with htp it is quite │ │ │ │ tricky, so here we present the way to do this: │ │ │ │ -  1. <_[_[_r_e_f_]_]_U_N_D_E_F tagname> │ │ │ │ -  2. <_[_[_r_e_f_]_]_U_N_D_E_F tagname1 tagname2 ... > │ │ │ │ -  3. │ │ │ │ +  1.     <_[_[_r_e_f_]_]_S_E_T emailaddr="jnelson@crl.com"> │ │ │ │ This defines a block macro named section. This │ │ │ │ macro uses a counter sect-ctr that enumerates the │ │ │ │ sections. It is increased for every section (line │ │ │ │ 3) and then the block macro name is build from this │ │ │ │ counter. So the first section is stored in block │ │ │ │ sect-1, the second in sect-2 and so on. The _[ │ │ │ │ _[_r_e_f_]_]_g_l_o_b_a_l flag in line 4 tells htp that these │ │ │ │ @@ -85,17 +84,21 @@ │ │ │ │ block to be expanded twice. If you omit it, it │ │ │ │ would be expanded when defining the sect-1 macro │ │ │ │ and when using it later in the template. Generally │ │ │ │ it is a good idea to use noexpand whenever you use │ │ │ │ expand in a block around it. │ │ │ │ To close this example we show how to expand the │ │ │ │ sect-${sect-ctr} blocks in the template: │ │ │ │ -  1. <_[_[_r_e_f_]_]_u_n_s_e_t macroname> │ │ │ │ -  2. <_[_[_r_e_f_]_]_u_n_s_e_t macroname1 macroname2 ... > │ │ │ │ -  3. │ │ │ │ +  1. <_[_[_r_e_f_]_]_f_i_l_e include="header.hti"> │ │ │ │ +  2.   <_[_[_r_e_f_]_]_s_e_t sect-ctr="1"> │ │ │ │ +  3.   <_[_[_r_e_f_]_]_w_h_i_l_e sect-${sect-ctr}> │ │ │ │ +  4.     <_[_[_r_e_f_]_]_u_s_e sect-${sect-ctr}> │ │ │ │ +  5.     <_[_[_r_e_f_]_]_i_n_c sect-ctr> │ │ │ │ +  6.   <_[_[_r_e_f_]_]_/_w_h_i_l_e> │ │ │ │ +  7. <_[_[_r_e_f_]_]_f_i_l_e include="footer.hti"> │ │ │ │ The _[_[_r_e_f_]_]_w_h_i_l_e tag in line 3 checks whether the │ │ │ │ macro sect-${sect-ctr} is defined. If it is defined │ │ │ │ the body is evaluated, which expands the macro and │ │ │ │ increases sect-ctr. Afterwards the while condition │ │ │ │ is checked again to check for sect-2 macro. This │ │ │ │ repeats until sect-${sect-ctr} is not defined. │ │ │ │ ********** CCoonncclluussiioonnss ********** │ │ ├── ./usr/share/doc/htp/set.html │ │ │ @@ -114,27 +114,29 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -  <[ref]def name="sharedimg" option="name alt">
│ │ │ -    <[ref]img src="/home/sharedimages/${name}" alt="${alt}">;
│ │ │ -  <[ref]/def>
│ │ │ +<[ref]UNDEF tagname>
│ │ │ +<[ref]UNDEF tagname1 tagname2 ... >
│ │ │
│ │ │ -  <sharedimg name="bubble.gif" alt="Bubble image">
│ │ │

│ │ │

synopsis

│ │ │ SET creates a macro definition that can later be expanded │ │ │ anywhere in the HTML document. To create a macro: │ │ │

│ │ │ -<[ref]UNDEF tagname>
│ │ │ -<[ref]UNDEF tagname1 tagname2 ... >
│ │ │ -
│ │ │ +<[ref]file include="header.hti">
│ │ │ +  <[ref]set sect-ctr="1">
│ │ │ +  <[ref]while sect-${sect-ctr}>
│ │ │ +    <[ref]use sect-${sect-ctr}>
│ │ │ +    <[ref]inc sect-ctr>
│ │ │ +  <[ref]/while>
│ │ │ +<[ref]file include="footer.hti">
│ │ │

│ │ │

│ │ │ The macro "emailaddr" can then be expanded later. The │ │ │ USE tag is used to expand the macro outside a tag (i.e., into the regular │ │ │ text). If the macro needs to be expanded inside a markup tag, use the │ │ │ '$' operator. │ │ │

│ │ │ ├── html2text {} │ │ │ │ @@ -1,36 +1,37 @@ │ │ │ │ [HTP] │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: SSEETT ************ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n   <_[_[_r_e_f_]_]_d_e_f name="sharedimg" option="name alt"> │ │ │ │ -  _L_i_c_e_n_s_e     <_[_[_r_e_f_]_]_i_m_g src="/home/sharedimages/${name}" │ │ │ │ -  _T_u_t_o_r_i_a_l alt="${alt}">; │ │ │ │ -  _U_s_a_g_e   <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ -  HTP Tags │ │ │ │ -    _A_L_T_T_E_X_T   │ │ │ │ -    _B_L_O_C_K ********** ssyynnooppssiiss ********** │ │ │ │ -    _B_L_O_C_K_D_E_F SSEETT creates a macro definition that can later be │ │ │ │ -    _D_E_F expanded anywhere in the HTML document. To create a │ │ │ │ -    _F_I_L_E macro: │ │ │ │ -    _I_F <_[_[_r_e_f_]_]_U_N_D_E_F tagname> │ │ │ │ -    _I_N_C <_[_[_r_e_f_]_]_U_N_D_E_F tagname1 tagname2 ... > │ │ │ │ -    _I_M_G │ │ │ │ -    _I_M_A_G_E_U_R_L The macro "emailaddr" can then be expanded later. │ │ │ │ -    _O_P_T The _U_S_E tag is used to expand the macro outside a │ │ │ │ -    _O_U_T_P_U_T tag (i.e., into the regular text). If the macro │ │ │ │ -    _Q_U_O_T_E needs to be expanded inside a markup tag, use the │ │ │ │ -  [>] _S_E_T _'_$_' operator. │ │ │ │ -    _U_N_D_E_F Multiple macros can be declared in a single markup │ │ │ │ -    _U_N_S_E_T tag, as the second syntax line shows. │ │ │ │ -    _U_S_E_,_ _$ SET should only be used for a single line's worth │ │ │ │ -    _W_H_I_L_E of text. Multi-line macros can be defined with the │ │ │ │ -    _<_!_-_-_- _B_L_O_C_K tag. The _B_L_O_C_K tag is also useful if the │ │ │ │ -  _H_i_s_t_o_r_y macro contains a quotation character and you don't │ │ │ │ -  _W_i_s_h_ _l_i_s_t want to fool around with special escape characters. │ │ │ │ -  _B_u_g_s Macros can be redefined by using another SET │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_U_N_D_E_F tagname> │ │ │ │ +  _L_i_c_e_n_s_e <_[_[_r_e_f_]_]_U_N_D_E_F tagname1 tagname2 ... > │ │ │ │ +  _T_u_t_o_r_i_a_l │ │ │ │ +  _U_s_a_g_e ********** ssyynnooppssiiss ********** │ │ │ │ +  HTP Tags SSEETT creates a macro definition that can later be │ │ │ │ +    _A_L_T_T_E_X_T expanded anywhere in the HTML document. To create a │ │ │ │ +    _B_L_O_C_K macro: │ │ │ │ +    _B_L_O_C_K_D_E_F <_[_[_r_e_f_]_]_f_i_l_e include="header.hti"> │ │ │ │ +    _D_E_F   <_[_[_r_e_f_]_]_s_e_t sect-ctr="1"> │ │ │ │ +    _F_I_L_E   <_[_[_r_e_f_]_]_w_h_i_l_e sect-${sect-ctr}> │ │ │ │ +    _I_F     <_[_[_r_e_f_]_]_u_s_e sect-${sect-ctr}> │ │ │ │ +    _I_N_C     <_[_[_r_e_f_]_]_i_n_c sect-ctr> │ │ │ │ +    _I_M_G   <_[_[_r_e_f_]_]_/_w_h_i_l_e> │ │ │ │ +    _I_M_A_G_E_U_R_L <_[_[_r_e_f_]_]_f_i_l_e include="footer.hti"> │ │ │ │ +    _O_P_T The macro "emailaddr" can then be expanded later. │ │ │ │ +    _O_U_T_P_U_T The _U_S_E tag is used to expand the macro outside a │ │ │ │ +    _Q_U_O_T_E tag (i.e., into the regular text). If the macro │ │ │ │ +  [>] _S_E_T needs to be expanded inside a markup tag, use the │ │ │ │ +    _U_N_D_E_F _'_$_' operator. │ │ │ │ +    _U_N_S_E_T Multiple macros can be declared in a single markup │ │ │ │ +    _U_S_E_,_ _$ tag, as the second syntax line shows. │ │ │ │ +    _W_H_I_L_E SET should only be used for a single line's worth │ │ │ │ +    _<_!_-_-_- of text. Multi-line macros can be defined with the │ │ │ │ +  _H_i_s_t_o_r_y _B_L_O_C_K tag. The _B_L_O_C_K tag is also useful if the │ │ │ │ +  _W_i_s_h_ _l_i_s_t macro contains a quotation character and you don't │ │ │ │ +  _B_u_g_s want to fool around with special escape characters. │ │ │ │ + Macros can be redefined by using another SET │ │ │ │ command with the same macro name. The prior │ │ │ │ definition will be destroyed, however. Also, the │ │ │ │ macro can be removed (destroyed) with the _U_N_S_E_T │ │ │ │ tag. │ │ ├── ./usr/share/doc/htp/tut/jh.html │ │ │ @@ -16,10 +16,10 @@ │ │ │ Phone:+49 761 203-8243 │ │ │ Fax:+49 761 203-8242 │ │ │ │ │ │ │ │ │ │ │ │


│ │ │ Copyright by Joe Doe.
│ │ │ - last updated Mon Jan 29, 2024 │ │ │ + last updated Mon Jan 12, 2026 │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,8 +1,8 @@ │ │ │ │ ************ JJoocchheenn HHooeenniicckkee ************ │ │ │ │ Navigation bar [Photo] │ │ │ │ _M_a_i_n RRoooomm:: Bld.52 00-020 │ │ │ │ _E_x_a_m_p_l_e PPhhoonnee:: +49 761 203-8243 │ │ │ │ FFaaxx:: +49 761 203-8242 │ │ │ │ =============================================================================== │ │ │ │ Copyright by _J_o_e_ _D_o_e. │ │ │ │ -last updated Mon Jan 29, 2024 │ │ │ │ +last updated Mon Jan 12, 2026 │ │ ├── ./usr/share/doc/htp/tut/tut1.html │ │ │ @@ -5,9 +5,9 @@ │ │ │ │ │ │ │ │ │ │ │ │ This page was produced by htp. │ │ │
│ │ │ Copyright by Joe Doe, │ │ │ webmaster@domain.com, │ │ │ -last updated Mon Jan 29, 2024 │ │ │ +last updated Mon Jan 12, 2026 │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ This page was produced by htp. │ │ │ │ =============================================================================== │ │ │ │ -Copyright by Joe Doe, _w_e_b_m_a_s_t_e_r_@_d_o_m_a_i_n_._c_o_m, last updated Mon Jan 29, 2024 │ │ │ │ +Copyright by Joe Doe, _w_e_b_m_a_s_t_e_r_@_d_o_m_a_i_n_._c_o_m, last updated Mon Jan 12, 2026 │ │ ├── ./usr/share/doc/htp/tut/tut2.html │ │ │ @@ -13,10 +13,10 @@ │ │ │

│ │ │ As you can see the file contains almost only the contents. │ │ │

│ │ │ │ │ │ │ │ │
│ │ │ Copyright by Joe Doe.
│ │ │ - last updated Mon Jan 29, 2024 │ │ │ + last updated Mon Jan 12, 2026 │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,6 +1,6 @@ │ │ │ │ Navigation bar ********** HHeerree iiss tthhee ccoonntteenntt ********** │ │ │ │ _M_a_i_n As you can see the file contains almost only the contents. │ │ │ │ _E_x_a_m_p_l_e │ │ │ │ =============================================================================== │ │ │ │ Copyright by _J_o_e_ _D_o_e. │ │ │ │ -last updated Mon Jan 29, 2024 │ │ │ │ +last updated Mon Jan 12, 2026 │ │ ├── ./usr/share/doc/htp/tut/tut3.html │ │ │ @@ -13,10 +13,10 @@ │ │ │

│ │ │ As you can see the file contains almost only the contents. │ │ │

│ │ │ │ │ │ │ │ │
│ │ │ Copyright by Joe Doe.
│ │ │ - last updated Mon Jan 29, 2024 │ │ │ + last updated Mon Jan 12, 2026 │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,6 +1,6 @@ │ │ │ │ Navigation bar ********** HHeerree aarree tthhee ccoonntteennttss ********** │ │ │ │ _M_a_i_n As you can see the file contains almost only the contents. │ │ │ │ _E_x_a_m_p_l_e │ │ │ │ =============================================================================== │ │ │ │ Copyright by _J_o_e_ _D_o_e. │ │ │ │ -last updated Mon Jan 29, 2024 │ │ │ │ +last updated Mon Jan 12, 2026 │ │ ├── ./usr/share/doc/htp/unset.html │ │ │ @@ -114,39 +114,43 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -<[ref]unset macroname>
│ │ │ -<[ref]unset macroname1 macroname2 ... >
│ │ │ +<[ref]use macroname [parameters ...] [noexpand]>
│ │ │ +<... $macroname ...>
│ │ │ +<... ${macroname} ...>
│ │ │
│ │ │

│ │ │

synopsis

│ │ │ UNSET removes (or deletes) a macro and it's definition. │ │ │ The macro is subsequently not available for use in the pre-processed files. │ │ │ (Note that simply redefining the macro with another SET or │ │ │ BLOCK definition with the same name is acceptable. The │ │ │ old macro definition will be removed automatically.) │ │ │

│ │ │ For example: │ │ │

│ │ │ -<[ref]WHILE [NOT] conditional>
│ │ │ -    block
│ │ │ -<[ref]/WHILE>
│ │ │ +<[ref]block stuff>
│ │ │ +  <a href=$email>send email</a>
│ │ │ +<[ref]/block>
│ │ │
│ │ │ +<[ref]set morestuff=$email>
│ │ │ +
│ │ │ +This works:     <[ref]use stuff email="jnelson@crl.com">
│ │ │ +But this fails: <[ref]use email>
│ │ │ +And this fails: <[ref]use morestuff email="jnelson@crl.com">
│ │ │

│ │ │

│ │ │ More than one macro may be removed in the same tag: │ │ │

│ │ │ -  <[ref]WHILE NOT i="10">
│ │ │ -    ...
│ │ │ -    <[ref]INC i>
│ │ │ -  <[ref]/WHILE>
│ │ │ +<a href="mailto:$email">mailto hyperlink</a>
│ │ │ +<a href="http://$domain/~${username}/">another hyperlink</a>
│ │ │

│ │ │

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,36 +1,43 @@ │ │ │ │ [HTP] │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: UUNNSSEETT ************ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_u_n_s_e_t macroname> │ │ │ │ -  _L_i_c_e_n_s_e <_[_[_r_e_f_]_]_u_n_s_e_t macroname1 macroname2 ... > │ │ │ │ -  _T_u_t_o_r_i_a_l │ │ │ │ -  _U_s_a_g_e ********** ssyynnooppssiiss ********** │ │ │ │ -  HTP Tags UUNNSSEETT removes (or deletes) a macro and it's │ │ │ │ -    _A_L_T_T_E_X_T definition. The macro is subsequently not available │ │ │ │ -    _B_L_O_C_K for use in the pre-processed files. (Note that │ │ │ │ -    _B_L_O_C_K_D_E_F simply redefining the macro with another _S_E_T or │ │ │ │ -    _D_E_F _B_L_O_C_K definition with the same name is acceptable. │ │ │ │ -    _F_I_L_E The old macro definition will be removed │ │ │ │ -    _I_F automatically.) │ │ │ │ -    _I_N_C For example: │ │ │ │ -    _I_M_G <_[_[_r_e_f_]_]_W_H_I_L_E [NOT] conditional> │ │ │ │ -    _I_M_A_G_E_U_R_L     block │ │ │ │ -    _O_P_T <_[_[_r_e_f_]_]_/_W_H_I_L_E> │ │ │ │ -    _O_U_T_P_U_T │ │ │ │ -    _Q_U_O_T_E More than one macro may be removed in the same tag: │ │ │ │ -    _S_E_T   <_[_[_r_e_f_]_]_W_H_I_L_E NOT i="10"> │ │ │ │ -    _U_N_D_E_F     ... │ │ │ │ -  [>] _U_N_S_E_T     <_[_[_r_e_f_]_]_I_N_C i> │ │ │ │ -    _U_S_E_,_ _$   <_[_[_r_e_f_]_]_/_W_H_I_L_E> │ │ │ │ -    _W_H_I_L_E │ │ │ │ -    _<_!_-_-_- │ │ │ │ -  _H_i_s_t_o_r_y │ │ │ │ -  _W_i_s_h_ _l_i_s_t │ │ │ │ -  _B_u_g_s │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_u_s_e macroname [parameters ...] [noexpand]> │ │ │ │ +  _L_i_c_e_n_s_e <... $macroname ...> │ │ │ │ +  _T_u_t_o_r_i_a_l <... ${macroname} ...> │ │ │ │ +  _U_s_a_g_e │ │ │ │ +  HTP Tags ********** ssyynnooppssiiss ********** │ │ │ │ +    _A_L_T_T_E_X_T UUNNSSEETT removes (or deletes) a macro and it's │ │ │ │ +    _B_L_O_C_K definition. The macro is subsequently not available │ │ │ │ +    _B_L_O_C_K_D_E_F for use in the pre-processed files. (Note that │ │ │ │ +    _D_E_F simply redefining the macro with another _S_E_T or │ │ │ │ +    _F_I_L_E _B_L_O_C_K definition with the same name is acceptable. │ │ │ │ +    _I_F The old macro definition will be removed │ │ │ │ +    _I_N_C automatically.) │ │ │ │ +    _I_M_G For example: │ │ │ │ +    _I_M_A_G_E_U_R_L <_[_[_r_e_f_]_]_b_l_o_c_k stuff> │ │ │ │ +    _O_P_T   send email │ │ │ │ +    _O_U_T_P_U_T <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ +    _Q_U_O_T_E │ │ │ │ +    _S_E_T <_[_[_r_e_f_]_]_s_e_t morestuff=$email> │ │ │ │ +    _U_N_D_E_F │ │ │ │ +  [>] _U_N_S_E_T This works:     <_[_[_r_e_f_]_]_u_s_e stuff │ │ │ │ +    _U_S_E_,_ _$ email="jnelson@crl.com"> │ │ │ │ +    _W_H_I_L_E But this fails: <_[_[_r_e_f_]_]_u_s_e email> │ │ │ │ +    _<_!_-_-_- And this fails: <_[_[_r_e_f_]_]_u_s_e morestuff │ │ │ │ +  _H_i_s_t_o_r_y email="jnelson@crl.com"> │ │ │ │ +  _W_i_s_h_ _l_i_s_t More than one macro may be removed in the same tag: │ │ │ │ +  _B_u_g_s mailto hyperlink │ │ │ │ + another │ │ │ │ + hyperlink │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +