--- /tmp/htp-1.19-8nuxjswj7/debian/htp_1.19-8_amd64.deb +++ htp_1.19-8_amd64.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2020-06-14 23:21:19.000000 debian-binary │ --rw-r--r-- 0 0 0 3608 2020-06-14 23:21:19.000000 control.tar.xz │ --rw-r--r-- 0 0 0 115368 2020-06-14 23:21:19.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 3616 2020-06-14 23:21:19.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 115528 2020-06-14 23:21:19.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./control │ │ │ @@ -1,12 +1,12 @@ │ │ │ Package: htp │ │ │ Version: 1.19-8 │ │ │ Architecture: amd64 │ │ │ Maintainer: Marcelo Soares Mota │ │ │ -Installed-Size: 651 │ │ │ +Installed-Size: 652 │ │ │ Depends: libc6 (>= 2.14) │ │ │ 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,27 +1,27 @@ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/bin/ │ │ │ -rwxr-xr-x 0 root (0) root (0) 67928 2020-06-14 23:21:19.000000 ./usr/bin/htp │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/doc/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/ │ │ │ --rw-r--r-- 0 root (0) root (0) 8646 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/alttext.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10910 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/alttext.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1418 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/alttext.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 8252 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/block.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7945 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/block.html │ │ │ -rw-r--r-- 0 root (0) root (0) 781 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/block.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 10151 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/blockdef.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9484 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/blockdef.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1075 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/blockdef.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 4763 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/bugs.html │ │ │ -rw-r--r-- 0 root (0) root (0) 737 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/bugs.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 3273 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/changelog.Debian.gz │ │ │ --rw-r--r-- 0 root (0) root (0) 11511 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/comment.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13698 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/comment.html │ │ │ -rw-r--r-- 0 root (0) root (0) 676 2020-06-14 23:21:19.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) 13748 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/def.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17964 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/def.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3601 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/def.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 8030 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/default.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3149 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/default.htp │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.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 │ │ │ @@ -32,45 +32,45 @@ │ │ │ -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 2020-06-14 23:21:19.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 2020-06-14 23:21:19.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 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/expand.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9625 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/expand.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3702 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/expand.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 17206 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/file.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17402 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/file.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2490 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/file.htp.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 14293 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/history.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3946 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/history.htp.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 3911 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/hlhtp.pl │ │ │ -rw-r--r-- 0 root (0) root (0) 165 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/htp.def │ │ │ -rw-r--r-- 0 root (0) root (0) 4049 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/htp.htt │ │ │ --rw-r--r-- 0 root (0) root (0) 11939 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/if.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9593 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/if.html │ │ │ -rw-r--r-- 0 root (0) root (0) 932 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/if.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 9420 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/imageurl.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12182 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/imageurl.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2507 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/imageurl.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 8639 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/img.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8662 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/img.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1168 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/img.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 10059 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/inc.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10856 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/inc.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1092 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/inc.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 9881 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/include.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1894 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/include.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 4874 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/index.html │ │ │ -rw-r--r-- 0 root (0) root (0) 78 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/index.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 7733 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/intro.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3489 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/intro.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 10774 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/license.html │ │ │ -rw-r--r-- 0 root (0) root (0) 454 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/license.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 3782 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/macros.def │ │ │ -rw-r--r-- 0 root (0) root (0) 5088 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/macros.html │ │ │ -rw-r--r-- 0 root (0) root (0) 388 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/macros.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 15513 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/metatag.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12724 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/metatag.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2439 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/metatag.htp.gz │ │ │ --rw-r--r-- 0 root (0) root (0) 8471 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/opt.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7852 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/opt.html │ │ │ -rw-r--r-- 0 root (0) root (0) 608 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/opt.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 7809 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/options.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3100 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/options.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 8282 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/output.html │ │ │ -rw-r--r-- 0 root (0) root (0) 695 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/output.htp │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/ │ │ │ -rw-r--r-- 0 root (0) root (0) 171 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/arrow.png │ │ │ @@ -79,17 +79,17 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 25563 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/logo.png │ │ │ -rw-r--r-- 0 root (0) root (0) 455 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/manbig.png │ │ │ -rw-r--r-- 0 root (0) root (0) 491 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/manual.png │ │ │ -rw-r--r-- 0 root (0) root (0) 1313 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/poweredbyhtp.png │ │ │ -rw-r--r-- 0 root (0) root (0) 679 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/sficon.png │ │ │ -rw-r--r-- 0 root (0) root (0) 492 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/source.png │ │ │ -rw-r--r-- 0 root (0) root (0) 523 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pphtp.pl │ │ │ --rw-r--r-- 0 root (0) root (0) 8008 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/quote.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8086 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/quote.html │ │ │ -rw-r--r-- 0 root (0) root (0) 390 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/quote.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 11283 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/set.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9189 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/set.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1200 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/set.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 500 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/styles.css │ │ │ -rw-r--r-- 0 root (0) root (0) 27219 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/template.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2235 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/template.htp.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 1914 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/toc.def │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tut/ │ │ │ -rw-r--r-- 0 root (0) root (0) 146 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tut/footer.hti │ │ │ @@ -102,23 +102,23 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 192 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tut/tut2.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 501 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tut/tut3.html │ │ │ -rw-r--r-- 0 root (0) root (0) 191 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tut/tut3.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 356 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tut/tut3.htt │ │ │ -rw-r--r-- 0 root (0) root (0) 297 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tut/tut4.htt │ │ │ -rw-r--r-- 0 root (0) root (0) 10517 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tutorial.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3393 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tutorial.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 9042 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/undef.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8015 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/undef.html │ │ │ -rw-r--r-- 0 root (0) root (0) 460 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/undef.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 10179 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/unset.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9994 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/unset.html │ │ │ -rw-r--r-- 0 root (0) root (0) 658 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/unset.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 7681 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/usage.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2959 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/usage.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 11957 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/use.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13229 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/use.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3300 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/use.htp │ │ │ --rw-r--r-- 0 root (0) root (0) 9007 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/while.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10424 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/while.html │ │ │ -rw-r--r-- 0 root (0) root (0) 938 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/while.htp │ │ │ -rw-r--r-- 0 root (0) root (0) 5288 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/wishlist.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1311 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/wishlist.htp │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/doc-base/ │ │ │ -rw-r--r-- 0 root (0) root (0) 235 2020-06-14 17:36:12.000000 ./usr/share/doc-base/htp │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/lintian/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/lintian/overrides/ │ │ ├── ./usr/share/doc/htp/alttext.html │ │ │ @@ -114,30 +114,49 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -<[ref]alttext name="imagename" [ text="imagetext" ]>
│ │ │ +<!--- comment --->
│ │ │
│ │ │ +ction" 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

│ │ │ ALTTEXT declares an ALT attribute for any IMG tag with a SRC matching the ALTTEXT NAME. │ │ │ Since relative paths can be used to point to the same image, only the │ │ │ filename is considered in all comparisons. │ │ │

│ │ │ 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: │ │ │

│ │ │ -<!--- This comment doesn't appear in the HTML file --->
│ │ │ +  <[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.
│ │ │

│ │ │

│ │ │ 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, │ │ ├── ./usr/share/doc/htp/block.html │ │ │ @@ -114,15 +114,15 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -<[ref]alttext name="imagename" [ text="imagetext" ]>
│ │ │ +<!--- comment --->
│ │ │
│ │ │

│ │ │

synopsis

│ │ │

│ │ │ BLOCK and /BLOCK are used to create block macros, which │ │ │ are similar in use to SET macros, but can be │ │ │ multi-line definitions. │ │ ├── ./usr/share/doc/htp/blockdef.html │ │ │ @@ -114,40 +114,31 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -  <[ref]alttext name="logo.gif" text="Company logo">
│ │ │ +<[ref]blockdef name="tagname" [option="option1 [option2 ...]" ] [global] [expand]>
│ │ │ +  ... <[ref]use block> ...
│ │ │ +<[ref]/blockdef>
│ │ │
│ │ │ -  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:

│ │ │

│ │ │ -    <[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.
│ │ │

│ │ │

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

│ │ │

│ │ ├── ./usr/share/doc/htp/comment.html │ │ │ @@ -114,17 +114,24 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -<[ref]def name="tagname" [option="option1 [option2 ...]" ] [global] [expand]>
│ │ │ -<[ref]/def>
│ │ │ +  <[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

│ │ │

│ │ │ 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: │ │ │

│ │ │ @@ -138,29 +145,38 @@ │ │ │

│ │ │

│ │ │ 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: │ │ │

│ │ │

│ │ │ -  <[ref]def name="bigfont">
│ │ │ -    <font size="+4">
│ │ │ -  <[ref]/def>
│ │ │ -
│ │ │ -  <[ref]def name="/bigfont">
│ │ │ -    </font>
│ │ │ -  <[ref]/def>
│ │ │ -
│ │ │ -  <bigfont>Some large text</bigfont>
│ │ │ -e [ 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">
│ │ │ +  <[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">
│ │ │

│ │ │

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,57 +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]if disabled_because_xyz>
│ │ │ -  ...
│ │ │ -<[ref]/if>
│ │ │ -

│ │ │ -

│ │ │ -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: │ │ │ -

│ │ │ -

│ │ │ <[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: │ │ │ +

│ │ │ +

│ │ │ +    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.) │ │ │

│ │ │

│ │ │ -    <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">
│ │ │

│ │ │

│ │ │ 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 │ │ ├── ./usr/share/doc/htp/expand.html │ │ │ @@ -98,27 +98,27 @@ │ │ │

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]IF name="Jim">...<[ref]/IF>
│ │ │

│ │ │

│ │ │ 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. │ │ │

│ │ ├── ./usr/share/doc/htp/file.html │ │ │ @@ -114,42 +114,70 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -    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>.
│ │ │ +  <[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">
│ │ │

│ │ │

synopsis

│ │ │ FILE has several optional parameters of differing purpose. │ │ │ The output file's name, the current date and time, and the contents of │ │ │ another file may be included. Another file's time, date, or size may be │ │ │ added to the output file as well. │ │ │

│ │ │ As with all HTML, these tags do not have to be on their own line, so the │ │ │ following is perfectly acceptable: │ │ │

│ │ │ -    <EM>File "<[ref]FILE NAME>" last updated <[ref]FILE TIME>, <[ref]FILE DATE></EM>
│ │ │ +<[ref]IF [NOT] conditional>
│ │ │ +    block #1
│ │ │ +[
│ │ │ +<ELSEIF [NOT] conditional>
│ │ │ +    block #2
│ │ │ +...
│ │ │ +]
│ │ │ +[
│ │ │ +<ELSE>
│ │ │ +    block #3
│ │ │ +]
│ │ │ +<[ref]/IF>
│ │ │ +
│ │ │

│ │ │

│ │ │

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]imageurl url="imageurl" [ path="path/in/local/filesystem" ]>
│ │ │ -
│ │ │ +    <[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 │ │ │ @@ -178,36 +206,16 @@ │ │ │

│ │ │ 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="http://my.domain.org/" path="/var/www/my.domain/">
│ │ │ -  <[ref]imageurl url="other.domain.org/" path="/var/www/other.domain/">
│ │ │ +<[ref]imageurl url="imageurl" [ path="path/in/local/filesystem" ]>
│ │ │
│ │ │ -  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.
│ │ │

│ │ │

│ │ │ 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

│ │ ├── ./usr/share/doc/htp/if.html │ │ │ @@ -114,52 +114,31 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -<[ref]imageurl url="imageurl" [ path="path/in/local/filesystem" ]>
│ │ │ -
│ │ │ +    File image.gif <[ref]FILE NAME="image.gif" SIZE=KBYTE> kilobytes
│ │ │ +    Last modified <[ref]FILE NAME="image.gif" TIME>, <[ref]FILE NAME="image.gif" DATE>
│ │ │

│ │ │

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="http://my.domain.org/" path="/var/www/my.domain/">
│ │ │ -  <[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]IF name="Jim">...<[ref]/IF>
│ │ │

│ │ │

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

│ │ │

│ │ │ -<[ref]INC macroname1="increment1" [macroname2="increment2" ... ] [GLOBAL]>
│ │ │ +<[ref]imageurl url="imageurl" [ path="path/in/local/filesystem" ]>
│ │ │
│ │ │

│ │ │

│ │ │ 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 │ │ ├── ./usr/share/doc/htp/imageurl.html │ │ │ @@ -114,15 +114,16 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

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

│ │ │

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 │ │ │ @@ -136,16 +137,36 @@ │ │ │ checks (case-insensitive) if it is a prefix of the image's SRC │ │ │ attribute. If it matches this prefix is replaced by the given PATH. │ │ │ If no IMAGEURL matches the SRC is considered as relative link and │ │ │ looked up in the current directory.

│ │ │

│ │ │ For example:

│ │ │

│ │ │ -<[ref]INC macroname1="increment1" [macroname2="increment2" ... ] [GLOBAL]>
│ │ │ +  <[ref]imageurl url="http://my.domain.org/" path="/var/www/my.domain/">
│ │ │ +  <[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.
│ │ │

│ │ │

│ │ │ If IMAGEURL is specified with a URL but no PATH attribute, it is treated as │ │ │ an undefine, and is removed.

│ │ │

│ │ │ Since you usually need the url mapping for a number of images used throughout │ │ │ a set of documents, IMAGEURL is most appropriately put into an │ │ ├── ./usr/share/doc/htp/img.html │ │ │ @@ -114,15 +114,16 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

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

│ │ │

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 │ │ ├── ./usr/share/doc/htp/inc.html │ │ │ @@ -114,15 +114,21 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -<[ref]INC macroname1="increment1" [macroname2="increment2" ... ] [GLOBAL]>
│ │ │ +<[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)>
│ │ │
│ │ │

│ │ │

synopsis

│ │ │ The INC can be used for incrementing/decrementing a │ │ │ variable or for variable addition. The basic form is shown above. │ │ │

│ │ │ The "increment" is anything that evaluates to a integer. It can be a │ │ │ @@ -130,21 +136,17 @@ │ │ │ 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]OUTPUT FILE="outputfilename" [APPEND] [EXPAND]>
│ │ │ +text block
│ │ │ +<[ref]/OUTPUT>
│ │ │
│ │ │

│ │ │

│ │ │ 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. │ │ │

│ │ ├── ./usr/share/doc/htp/metatag.html │ │ │ @@ -88,22 +88,15 @@ │ │ │

Metatags are defined with the [ref]def and [ref]blockdef tags and │ │ │ undefined with the [ref]undef tag.

│ │ │

│ │ │ As an example we show how to define a tag that builds a │ │ │ fancy horizontal rule out of several images. │ │ │

│ │ │

│ │ │ - 1. <[ref]OPT (IMGXY|NOIMGXY)>
│ │ │ - 2. <[ref]OPT (QUIET|VERBOSE)>
│ │ │ - 3. <[ref]OPT (DEPEND|NODEPEND)>
│ │ │ - 4. <[ref]OPT (PRECIOUS|NOPRECIOUS)>
│ │ │ - 5. <[ref]OPT (CONDENSE|SEMICONDENSE|NOCONDENSE)>
│ │ │ - 6. <[ref]OPT DELIM=(HTML|SQUARE|CURLY)>
│ │ │ - 7. <[ref]OPT (XML|XML=FALSE)>
│ │ │ - 8.
│ │ │ + 1.     <[ref]INC i="1" j="-1">
│ │ │

│ │ │

In line 1 of the above example a new tag named imghr is defined. │ │ │ The html code which implements this rule is following in lines 2-8. │ │ │ between the [ref]def and │ │ │ /def tags. You don't have to understand this │ │ │ html code, but you should understand that this is just pure html to │ │ │ draw the fancy rule. Every time you write <imghr> │ │ │ @@ -113,38 +106,37 @@ │ │ │ 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]OUTPUT FILE="outputfilename" [APPEND] [EXPAND]>
│ │ │ - 2. text block
│ │ │ - 3. <[ref]/OUTPUT>
│ │ │ - 4.
│ │ │ + 1. <[ref]SET macroname1="macrovalue1" [macroname2="macrovalue2" ...] [GLOBAL]>
│ │ │ + 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 macroname1="macrovalue1" [macroname2="macrovalue2" ...] [GLOBAL]>
│ │ │ - 2.
│ │ │ + 1. <[ref]UNDEF tagname>
│ │ │ + 2. <[ref]UNDEF tagname1 tagname2 ... >
│ │ │ + 3.
│ │ │

│ │ │

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 ... >
│ │ │ + 1. <[ref]unset macroname>
│ │ │ + 2. <[ref]unset macroname1 macroname2 ... >
│ │ │  3.
│ │ │

│ │ │

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 │ │ │ @@ -164,21 +156,15 @@ │ │ │ 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]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">
│ │ │ + 1.     <[ref]unset email_addr home_url login_name>
│ │ │

│ │ │

│ │ │ 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. │ │ ├── ./usr/share/doc/htp/opt.html │ │ │ @@ -114,21 +114,15 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -  <[ref]blockdef name="bolditalic">
│ │ │ -    <b><i>
│ │ │ -    <[ref]use block>
│ │ │ -    </i></b>
│ │ │ -  <[ref]/blockdef>
│ │ │ -
│ │ │ -  This is <bolditalic>bold and italic</bolditalic>
│ │ │ +    <[ref]INC i="1" j="-1">
│ │ │

│ │ │

synopsis

│ │ │ OPT is an htp tag that can be used to specify processing │ │ │ options inside the actual document being processed. The options are │ │ │ used exactly as they would be on the command-line, although they are not │ │ │ preceded by a ‘-’ character. │ │ │

│ │ ├── ./usr/share/doc/htp/quote.html │ │ │ @@ -114,15 +114,17 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -<[ref]SET macroname1="macrovalue1" [macroname2="macrovalue2" ...] [GLOBAL]>
│ │ │ +<[ref]OUTPUT FILE="outputfilename" [APPEND] [EXPAND]>
│ │ │ +text block
│ │ │ +<[ref]/OUTPUT>
│ │ │
│ │ │

│ │ │

synopsis

│ │ │ QUOTE is used to quote a macro that would otherwise │ │ │ be interpreted by HTP. It may be useful in conjunction with a │ │ │ surrounding EXPANDed block to prevent early │ │ │ expansion of some contained blocks. Note that '$' evaluation is still │ │ ├── ./usr/share/doc/htp/set.html │ │ │ @@ -114,35 +114,24 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -  <[ref]set sect-ctr="0">
│ │ │ -  <[ref]blockdef name="section">
│ │ │ -    <[ref]inc sect-ctr>
│ │ │ -    <[ref]block name="sect-${sect-ctr}" expand global>
│ │ │ -      <[ref]use block noexpand>
│ │ │ -    <[ref]/block>
│ │ │ -  <[ref]/blockdef>
│ │ │ +<[ref]SET macroname1="macrovalue1" [macroname2="macrovalue2" ...] [GLOBAL]>
│ │ │ +
│ │ │

│ │ │

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]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. │ │ │

│ │ ├── ./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 Tue Jun 16, 2020 │ │ │ + last updated Wed Oct 13, 2021 │ │ │ │ │ │ │ │ ├── ./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 Tue Jun 16, 2020 │ │ │ +last updated Wed Oct 13, 2021 │ │ │ │ │ ├── ./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 Tue Jun 16, 2020 │ │ │ + last updated Wed Oct 13, 2021 │ │ │ │ │ │ │ │ ├── ./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 Tue Jun 16, 2020 │ │ │ + last updated Wed Oct 13, 2021 │ │ │ │ │ │ │ │ ├── ./usr/share/doc/htp/undef.html │ │ │ @@ -114,21 +114,17 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -<[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">
│ │ │ +<[ref]unset macroname>
│ │ │ +<[ref]unset macroname1 macroname2 ... >
│ │ │ +
│ │ │

│ │ │

synopsis

│ │ │

UNDEF removes a metatag definition. Metatags │ │ │ created by DEF and BLOCKDEF can be removed with the UNDEF │ │ │ command. Once removed, the metatag will no longer be recognized by │ │ │ htp until it is reassigned.

│ │ ├── ./usr/share/doc/htp/unset.html │ │ │ @@ -114,42 +114,40 @@ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -<[ref]unset macroname>
│ │ │ -<[ref]unset macroname1 macroname2 ... >
│ │ │ -
│ │ │ +<[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">
│ │ │

│ │ │

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]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">
│ │ │ +    <[ref]unset email_addr>
│ │ │

│ │ │

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

│ │ │ -<a href="mailto:$email">mailto hyperlink</a>
│ │ │ -<a href="http://$domain/~${username}/">another hyperlink</a>
│ │ │ +<[ref]use macroname [parameters ...] [noexpand]>
│ │ │ +<... $macroname ...>
│ │ │ +<... ${macroname} ...>
│ │ │ +
│ │ │

│ │ │

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/htp/use.html │ │ │ @@ -135,18 +135,23 @@ │ │ │ attribute to prevent further expansion.

│ │ │

USE will accept additional parameters, which are "local" macros │ │ │ for the expanded macro. This is only valid for BLOCK macros. Macros created using SET cannot have parameters passed. For │ │ │ example:

│ │ │

│ │ │ - 1.   <[ref]WHILE NOT i="10">
│ │ │ - 2.     ...
│ │ │ - 3.     <[ref]INC i>
│ │ │ - 4.   <[ref]/WHILE>
│ │ │ + 1. <[ref]block stuff>
│ │ │ + 2.   <a href=$email>send email</a>
│ │ │ + 3. <[ref]/block>
│ │ │ + 4.
│ │ │ + 5. <[ref]set morestuff=$email>
│ │ │ + 6.
│ │ │ + 7. This works:     <[ref]use stuff email="jnelson@crl.com">
│ │ │ + 8. But this fails: <[ref]use email>
│ │ │ + 9. And this fails: <[ref]use morestuff email="jnelson@crl.com">
│ │ │

│ │ │

│ │ │ (See below for a description of the '$' operator.) The example on │ │ │ line 7 works because "stuff" has been declared as a block macro, and │ │ │ the tag is passing the "email" macro to the "stuff" macro. Line 8 │ │ │ fails because the "email" macro is unavailable once the block macro is │ │ │ completely expanded, and cannot be passed to a SET macro. │ │ │ @@ -157,16 +162,18 @@ │ │ │ Inside a markup tag, like IMG, A (anchor), or │ │ │ any other standard HTML or htp tag, the '$' operator must be used. │ │ │ The '$' should be immediately followed by the macro name, which may or │ │ │ may not be surrounded by curly braces. When htp encounters this it │ │ │ replaces the macro name by the contents of the macro without further │ │ │ processing the contents. │ │ │

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

│ │ │

│ │ │ The use of curly braces is encouraged, since it is more robust and │ │ │ should never cause confusion with surrounding text. If no curly │ │ │ braces are used the macro name consists either of a single punctuation │ │ │ character or the maximum sequence of letters, digits, "-" │ │ │ and "_" that follows it. │ │ ├── ./usr/share/doc/htp/while.html │ │ │ @@ -114,27 +114,37 @@ │ │ │ Bugs │ │ │

│ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │

│ │ │ -    <[ref]unset email_addr home_url login_name>
│ │ │ +<[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">
│ │ │

│ │ │

synopsis

│ │ │ WHILE is the building block for repeated 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. │ │ │ If the NOT tag is present in the WHILE markup, the evaluation of the │ │ │ conditional is reversed: │ │ │

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

│ │ │

│ │ │ Just as with [ref]IF you can also check for a │ │ │ macro's existance: │ │ │

│ │ │     <${tagName} ${attrName}=${value$ctr}>
│ │ │