home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 6 File / 06-File.zip / sphydir3.zip / docs / sphydir.INF (.txt) < prev    next >
OS/2 Help File  |  1995-05-04  |  171KB  |  2,117 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. The SpHyDir Project ΓòÉΓòÉΓòÉ
  3.  
  4.  Use of the Internet and particularly of the World Wide Web has exploded in 
  5. recent months. However, the language in which Web documents is written (HTML) 
  6. is obscure. It is difficult to master even its simpler features, while experts 
  7. rush to add even more complicated new features to the language. Many documents 
  8. include mistakes that can produce various results on different viewing 
  9. programs. Getting the basic material right can be so difficult that users often 
  10. ignore recommended options that could improve the quality of the document. 
  11.  
  12.  SpHyDir replaces the HTML syntax with a graphic view of the document 
  13. structure. Within the SpHyDir workarea, objects are created to represent 
  14. chapters, sections, paragraphs, images, lists, and data-entry forms elements. 
  15. The objects are arranged in a natural hierarchy: Sections contain subsections 
  16. which in turn contain paragraphs, images, and lists. Lists contain numbered or 
  17. unnumbered points. Forms contain entry fields and buttons. 
  18.  
  19.  SpHyDir runs in OS/2 Warp and follows the Workplace model of its user 
  20. interface. The user drags a document into the workarea. New elements are added 
  21. to the document by dragging empty paragraph, image, list, or forms objects and 
  22. dropping them into the document. Hypertext links are created by dragging files 
  23. from the library or URL references from a Web Browser and dropping them on 
  24. existing text or images. 
  25.  
  26.  Unlike "HTML Editors" SpHyDir concentrates on the entire library of related 
  27. files. The following links are to "subdocuments," separate Web files that are 
  28. logically part of a single logical document. Among subdocuments, SpHyDir 
  29. automatically generates links to the [Next] and [Previous] document and back 
  30. here to the root document. If a global change needs to be made, the entire 
  31. collection of related files can be regenerated. 
  32.  
  33.  SpHyDir only reads Web (HTML) documents. However, after editing it produces 
  34. both a revised *.HTM file and a second *.IPF file that is input to the OS/2 
  35. Help compiler. IPF source can be used to generate INF documentation and HLP 
  36. program help files. INF files can be viewed in OS/2 and (with a tool from IBM) 
  37. in Windows. Viewing information from a local hypertext file is faster, and 
  38. there are additional keyword search functions not available through the Web. 
  39. The document you are now viewing (and its related files) are also available as 
  40. SPHYDIR.INF. Since this represents a useful example of many SpHyDir features, 
  41. the source is available for download along with the SpHyDir program. 
  42.  
  43.  
  44. ΓòÉΓòÉΓòÉ 2. Project Status ΓòÉΓòÉΓòÉ
  45.  
  46.  This section is provided for existing SpHyDir users to quickly review changes 
  47. in the most recent releases. It can also give new users a view of the pace of 
  48. change. 
  49.  
  50.  
  51. ΓòÉΓòÉΓòÉ 2.1. May 4 Release ΓòÉΓòÉΓòÉ
  52.  
  53.  This version should preserve the case of file names and directories (on HPFS 
  54. disks where lowercase is possible). The user is responsible for preserving case 
  55. during a transfer to a Unix server. 
  56.  
  57.  SpHyDir was not backing up files unless the user created the BACKUP directory. 
  58. Now it will be created if it doesn't exist. 
  59.  
  60.  SpHyDir would not create a new directory if the user typed it as part of the 
  61. name of a new document. Now SpHyDir will create one level of new directory 
  62. structure in the library. 
  63.  
  64.  If SpHyDir cannot make a backup copy, it will generate a message. If it cannot 
  65. write the file, it will generate a message and give the user an opportunity to 
  66. correct the problem. For example, if the user is trying to create a new file 
  67. named "animals/birds/robins.htm" and there is no "animals" subdirectory of the 
  68. library, then SpHyDir will not be able to save the file (it will create one new 
  69. level of subdirectory structure, but it will not create both animals and 
  70. animals/birds). SpHyDir should in all cases return to the user after a popup 
  71. message. The user can (if the problem is understood) respond manually by 
  72. creating the extra directories outside SpHyDir and then retrying the Generate. 
  73.  
  74.  Although it is intended as a test tool and not a backup, F5 will generate the 
  75. current HTML as TEMPDOC.HTM in the root of the HTMLLIB. If the file cannot be 
  76. saved to its intended location (say because the original file was marked 
  77. Read-Only) and the user cannot diagnose or fix the problem manually, it is 
  78. possible to generate the TEMPDOC.HTM, exit, fix the problem, and then copy the 
  79. contents of TEMPDOC to the originally intended location. 
  80.  
  81.  F5 is now a Test key. Pressing it generates a temporary HTML file. SpHyDir 
  82. then launches Web Explorer to view it. It is intended in a future release that 
  83. SpHyDir should send keystrokes to WE if it is already launched to load or 
  84. refresh the file. For now, you have to exit and reload WE each test. 
  85.  
  86.  A bug was fixed that "hid" the main SpHyDir window when there was no 
  87. SPHYDIR.INI file. 
  88.  
  89.  Files should now be able to have more than one period. Previously, a filename 
  90. of "a.b.html" was not regarded as an HTML file. 
  91.  
  92.  LINK REL=Up is now generated correctly. 
  93.  
  94.  
  95. ΓòÉΓòÉΓòÉ 2.2. Worklist (Still to Do) ΓòÉΓòÉΓòÉ
  96.  
  97.  Requests seem to come in faster than results go out. 
  98.  
  99.      The BASE statement in the document HEAD identifies the directory in which 
  100.       the file is found and provides some protection against errors. It is 
  101.       desirable to generate a BASE, but it is undesirable for the BASE to be 
  102.       different on the users OS/2 test machine from the correct value that it 
  103.       should have on the final server. A single user may maintain several 
  104.       separate HTMLLIB roots for document development, yet mount several of 
  105.       them under different directories on the same server. This means that the 
  106.       BASE is related to HTMLLIB, but has to be configured explicitly and 
  107.       cannot be automatically generated based on the full path name that the 
  108.       file happens to have on OS/2. 
  109.  
  110.      The requirements for centering have become clearer. The <CENTER> tag is 
  111.       widely supported in practice, though it is depricated in all of the 
  112.       documents. The HTML 3.0 standard will support <P ALIGN=CENTER>, but it is 
  113.       not widely supported today. It appears that SpHyDir should read in 
  114.       existing HTML and parse either kind of CENTER directive. It should then 
  115.       assign a "centered" attribute to objects that fall in the range of that 
  116.       directive. However, at the end of building the document object tree, 
  117.       SpHyDir will have "forgotten" if the file that was read in used old or 
  118.       new syntax. It will then generate either old or new syntax when the file 
  119.       is regenerated based on the user's configured preference. 
  120.  
  121.      A <BR> object must be defined much like the current <HR> to separate 
  122.       Forms objects that should occur on separate lines. It is trivial to 
  123.       generate the object, and it is trivial to write it out as HTML. The 
  124.       problem is to recognize on input the <BR>-as-an-object from the 
  125.       <BR>-as-a-character-in-a-paragraph. 
  126.  
  127.      The BLOCKQUOTE tag should be supported in some manner. Perhaps it is a 
  128.       special attribute on a Paragraph object. 
  129.  
  130.      When an object is selected by dropping something on it (or by creating a 
  131.       new object by dropping a tool) then the entry areas at the top of the 
  132.       main window and the Links from the current object in the Link Manager 
  133.       window are not always updated to reflect the object that has actually 
  134.       been selected. Rather, information about the previously selected object 
  135.       can remain visible. 
  136.  
  137.      There is a request to let the user define a table of META NAME fields, 
  138.       then allow those META items to be set for the document object and written 
  139.       to the <HEAD> area. 
  140.  
  141.      Time permitting, it appears that ISMAP support (at least for rectangular 
  142.       selection areas on the image) is worth a shot and might be easily added. 
  143.  
  144.      I tire of having to go back to the previous document and refresh the 
  145.       Subdocument object that points to this file because the date in the title 
  146.       is always changing. It seems like a good idea if when a Subdocument 
  147.       reference is processed in a parent file then SpHyDir should fetch the 
  148.       Doctitle Extended Attribute in the referenced file and update the Title 
  149.       text if the title has changed. 
  150.  
  151.      If you generate one document, then drag a second HTML file over onto the 
  152.       workarea to replace the first document, SpHyDir occasionally crashes. I 
  153.       have not found a reproducable case, and since you are between files, the 
  154.       response is simply to reopen SpHyDir and drop the same file on a clean 
  155.       window. 
  156.  
  157.   As a result of learning more HTML, as the language threatens to grow in HTML 
  158.  3, and as users request more obscure features, it becomes clear that the 
  159.  current Toolbar and Properties/EntryAreas at the top of the Workarea are not 
  160.  going to work forever. To add a Table tool or to support a Center property 
  161.  will just overload the limited space. Work has begun (and bugs have been 
  162.  created and fixed) to migrate to a more Visual Basic/Delphi-ish approach. The 
  163.  Toolbar should be detachable in its own window. The current limited properties 
  164.  need to be expandable to a table with lots more properties and clearer 
  165.  documentation. The current approach seemed easier in a simpler world, but 
  166.  things just don't want to stay simple. 
  167.  
  168.   Longer term issues for study include support of other languages (an ISO 
  169.  8859-1 edit box), ISMAP, and the curious behavior when points are dragged out 
  170.  of lists and left in other places. 
  171.  
  172.  
  173. ΓòÉΓòÉΓòÉ 2.3. April 18 Release ΓòÉΓòÉΓòÉ
  174.  
  175.  A user reported that when a document had an HTML error, the HTML Edit Window 
  176. seemed to loop never correcting the problem. More precisely, if there is an 
  177. HTML error, and you edit the original file but do not correct the error, then 
  178. the Retry button parses the edited file but when the same error, or a second 
  179. error, or a new error is encountered then the first edit changes were lost and 
  180. the original file was redisplayed. This has been fixed. 
  181.  
  182.  In response to a user request, the </LI> tag is now tolerated. It will be read 
  183. in without complaint from a raw HTML file, though it will not be regenerated 
  184. when the file is rewritten. The idea of </LI> may come as a shock, since it is 
  185. almost never actually used. However, technically the semantics of HTML hold 
  186. that a <UL> or <OL> contains only <LI> elements. The <LI> in turn contains 
  187. paragraphs and stuff. So while ordinary people write: 
  188. <OL> 
  189. <LI> One. 
  190. <LI> Two. 
  191. </OL> 
  192. A rigourous HTML would write it as: 
  193. <OL> 
  194. <LI><P>One.</P></LI> 
  195. <LI><P>Two.</P></LI> 
  196. <OL> 
  197. Of course </P> and </LI> are optional and usually omitted. The leading <P> is 
  198. also often omitted when it follows another "breaking" tag like <LI> or <Hn>. 
  199. SpHyDir has been rather obsessive about adding </P> where it belongs. However, 
  200. to grant structural significance to </LI> would mean rethinking the handling of 
  201. Point Objects. The implication is that Point objects should not themselves 
  202. contain text but they should contain a second redundant Paragraph Object that 
  203. should contain the text. This is more obsessive than I am willing to get at 
  204. this time. 
  205.  
  206.  On 4/9 I noticed that the Web Explorer INI file with the hotlist was being 
  207. left open. I added some code to fix the problem, but it turned out that the 
  208. code was incomplete. Applologies to those who then reported the bug and were 
  209. told that "it was fixed in the 4/10 code." 
  210.  
  211.  
  212. ΓòÉΓòÉΓòÉ 2.4. April 13 Release ΓòÉΓòÉΓòÉ
  213.  
  214.  There was a bug deleting links. SpHyDir failed with a message about "start.0" 
  215. not 0 or 1. The test that a file was in the library was case sensitive, 
  216. producing error messages when working directly with an NFS mounted HTML 
  217. library. 
  218.  
  219.  The HTMLLIB variable is now optional. If omitted, SpHyDir assumes that the 
  220. "current directory" is the HTML library. This allows you to configure several 
  221. SpHyDir Program Objects to process different libraries on different disks or 
  222. servers. 
  223.  
  224.  
  225. ΓòÉΓòÉΓòÉ 2.5. April 10 Release ΓòÉΓòÉΓòÉ
  226.  
  227.  XSpO's have been given icons and are put in a subdirectory of the distribution 
  228. file. XSpO files no longer have to be in the PATH. 
  229.  
  230.  Although OS/2 is supposed to adjust windows for changes in screen resolution, 
  231. this didn't seem to work for the Vertical direction. SpHyDir now initializes 
  232. the Workarea window in a size that fits nicely on 640x480. This window is now 
  233. resizable (at least vertically). The size is now saved in SPHYDIR.INI and is 
  234. supposed to be restored when the program is next run. 
  235.  
  236.  In response to a request from a user, SpHyDir now searches for "../header.htm" 
  237. if a "header.htm" file is not found in the current directory. The same for 
  238. "trailer.htm". This allows the library to generate headers and trailers out of 
  239. a common file. 
  240. Note: if the parent directory has a header.htm file, and you want no header in 
  241. a file in a subdirectory, it is now necessary to put an empty HEADER.HTM and/or 
  242. TRAILER.HTM file in the subdirectory to make sure that the parent files are not 
  243. included. This is a change from the previous releases. 
  244.  
  245.  A user requested support for the 'Mailto' URL. Then the Web Explorer Beta 
  246. released last week added support for "mailto". I promised that it would be 
  247. added. However, when I started work on this code it became clear that this 
  248. should be External Rexx Code (an XSpO) and not buried inside the SpHyDir 
  249. source. The XSpO interface was already inserted in the right place, it just 
  250. needed sample code. So MAILTO.CMD is not in the XSpO library. It inserts a mail 
  251. link back to me. I would appreciate it if you edit this file and insert someone 
  252. else's E-MAIL address, or get the address from some database. If you have a 
  253. problem with it, send me a report (example Mailto generated by dropping the 
  254. XSpO on this paragraph). 
  255.  
  256.  An uninitialized Subdocument object cause HTML generation to fail, when the 
  257. logic tried to search a null string for the file type of the subdocument file. 
  258.  
  259.  The Next, Up, and Previous document variables were not being reset to a null 
  260. string when a new document was started by dragging the first icon off the 
  261. Toolbar and dropping it on the Workarea. This produced incorrect LINK tags in 
  262. the header of the new file the first time it was written to disk (though the 
  263. problem would be fixed automatically if the file was ever subsequently reedited 
  264. with SpHyDir). 
  265.  
  266.  There was a bug in the March 27 code that generated inappropriate comments in 
  267. the HTML and poped up the "variable" name window for the first paragraph of a 
  268. section when reediting a SpHyDir HTM file more than a few weeks old. Older 
  269. SpHyDir files had dummy " target" information (A NAME= tags) inserted before 
  270. each header (Hn tag). When the file was reread, the tag was recognized as an 
  271. internal SpHyDir construct and was ignored. A few weeks ago, SpHyDir stopped 
  272. generating the dummy A NAME tags because it was decided that they would not be 
  273. used in the Table of Content project. However, older files still had the tags, 
  274. and a bug in the code that read them in left a value in the "name" variable 
  275. that fell through and was applied to the next object. The Name attribute wasn't 
  276. meaningful for Image or Paragraph objects, so this bug sat around for a month 
  277. with no effect. Then the March 27 code added support that would eventually 
  278. allow Paragraph objects to be assigned a Forms Variable name so that results of 
  279. a query could be returned as ordinary paragraph text and not just MLE contents. 
  280. No problem was noted since all the test files are actively used and had, 
  281. therefore, been rewritten in the previous weeks removing the dummy A NAME tags. 
  282. However, if an old file was processed, the bug assigned a "name" variable to 
  283. the next paragraph, which was now misinterpreted as a Forms Insert Variable 
  284. name generating a symbol table entry and an HTML comment. The bug has been 
  285. fixed, and any erroneous comments will be filtered out when the file is next 
  286. reprocessed. 
  287.  
  288.  This brings up the general strategy for bugs. SpHyDir is constrained to 
  289. produce HTML good enough to pass a Validator program. There is also a view that 
  290. Extended Attributes are easily lost, so nothing of permanent importance can be 
  291. stored in them. SpHyDir elements are stored in one of several forms: 
  292.  
  293.    1. Some structural elements are represented by constraints on ordinary HTML. 
  294.       For example, the convention that <Hn> header tags are used to start 
  295.       sections is such a constraint. 
  296.  
  297.    2. Some elements use features of HTML 2.0 that are clearly valid but 
  298.       imprecise. The generation of a Subdocument as <A HREF="file" 
  299.       REL="SUBDOCUMENT"> falls in this category. REL and the value 
  300.       "SUBDOCUMENT" are in the 2.0 standard, but their use is treated largely 
  301.       as commentary. It is a SpHyDir convention that a link of this form has a 
  302.       special significance beyond other HREF hypertext links. 
  303.  
  304.    3. If no HTML 2.0 feature is available, SpHyDir reserves the right to select 
  305.       syntax from the 3.0 standard. For example, if the IPF files are to be 
  306.       used to generate HLP files, then each <Hn> tag must have a numeric id 
  307.       (call the Resource number). The HTML 3.0 standard has an ID= attribute in 
  308.       the Hn tag. Thus SpHyDir is likely to generate 
  309.       <H2 ID=RES00103>The Answer to Everything</H2> 
  310.       as a compact way to add the resource into the file. Note that although 
  311.       SpHyDir may for its own internal processing purposes generate some HTML 
  312.       3.0 syntax, it doesn't have enough object attributes to store and 
  313.       regenerate all the new attributes that that standard supplies. Hense, 
  314.       SpHyDir currently only promises to support the HTML 2.0 subset of syntax 
  315.       for user-generated tag information. This is not ideal, but the problem 
  316.       can be fixed in a later cycle if a better solution comes along. 
  317.  
  318.    4. The last option is to generate a real HTML comment. Such comments start 
  319.       with the word "SpHyDir" as in <!-- SpHyDir foo bar -->. This is certainly 
  320.       the cleanest choice, but it is an awkward syntax to parse and manage. 
  321.  
  322.   If it is discovered that SpHyDir is generating something wong, or if a 
  323.  feature is changed or removed, then subsequent versions of SpHyDir are coded 
  324.  to recognize the old construct on input but to generate the newest version of 
  325.  the syntax on output. The particular syntax inside an HTML comment may, for 
  326.  example, change across such an update to distinuish old and corrected 
  327.  constructs. For example, if the ID=RES0xxxx syntax were inserted in headers 
  328.  for a while, and then were changed to something else, the use of an ID 
  329.  attribute beginning "RES0" might remain restricted indefinitely to be one form 
  330.  of defining a resource number. 
  331.  
  332.  
  333. ΓòÉΓòÉΓòÉ 2.6. March 27 Release ΓòÉΓòÉΓòÉ
  334.  
  335.  Perhaps in response to the recent burst of development, not much was done with 
  336. SpHyDir this weekend. Once you have Forms, the next thing to do is to connect 
  337. the forms processing programs to database. Thus the weekend was lost looking at 
  338. the database alternatives for Rexx in OS/2 and working on the currently 
  339. incomplete documentation of the GOSERVE filter and program development 
  340. environment. 
  341.  
  342.  A few bugs were reported last week and are fixed. Some Emphasis keywords were 
  343. not supported. The ALT-H got messed up and has been restored. 
  344.  
  345.  
  346. ΓòÉΓòÉΓòÉ 2.7. March 20 Release ΓòÉΓòÉΓòÉ
  347.  
  348.  An enormous number of features have been added in the last four days. Forms 
  349. support is nearly complete. A lot of testing found a number of small bugs in 
  350. the forms code. A scheme to integrate SpHyDir forms and the IBM GOSERVE package 
  351. as been created. 
  352.  
  353.      SpHyDir creates all the HTML 2.0 forms objects (excluding ISMAP, which is 
  354.       technically not a part of Forms). 
  355.  
  356.      SpHyDir "compiles" into the external attributes of the file a symbol 
  357.       table of Forms variables and the location in the file where the 
  358.       corresponding character string is located. 
  359.  
  360.      The SpHyDir_Extract helper routine can be used by a Rexx processing 
  361.       program running under the GOSERVE Web Server environment to extract the 
  362.       parameters of a Forms request and turn them into native Rexx variables. 
  363.  
  364.      The SpHyDir_Reply help routine, running in the same environment, takes 
  365.       the name of a SpHyDir generated HTML file, copies it into a temporary 
  366.       dataset inserting the current values of Rexx variables (if they exist) 
  367.       for each correspondingly named Forms variable defined in the HTML file. 
  368.  
  369.   Minor changes, often requested by users: 
  370.  
  371.      SpHyDir now allows the Definition Term <DT> to be a hypertext link to 
  372.       some other document. This was patched in, so there is a restriction that 
  373.       if an <A HREF=> appears anywhere in the term, the entire term is treated 
  374.       as the hyperlink and, therefore, you cannot have two links from different 
  375.       words in the term. 
  376.  
  377.      HREF=filename is now rather rigourously folded to lowercase to simplify 
  378.       the process of porting scripts to Unix servers. Again, I tried to sweep 
  379.       up all the loose ends, and if you can find any I missed I will be quite 
  380.       interested in examples of any filenames that still come out in uppercase. 
  381.  
  382.      IPF files can get to be an annoyance if you don't want them. SpHyDir now 
  383.       will not build an IPF file unless something with that name already 
  384.       exists. If you have a file named, say, SOME.HTM and you want an IPF file 
  385.       created, then just 
  386.       [c:]copy some.htm some.ipf 
  387.       Then the next time SpHyDir processes SOME.HTM it will notice that the IPF 
  388.       file is present and will replace it with the corresponding IPF source. 
  389.       This seemed like the simplest way to handle the choice. 
  390.  
  391.      The Icons are now all bound to the EXE as resources and are referenced as 
  392.       such. Therefore, SpHyDir no longer requires that the current directory 
  393.       have all the *.ICO files and they are no longer distributed in the ZIP 
  394.       file. If you wish, you can get rid of them in your directory as well. 
  395.  
  396.  
  397. ΓòÉΓòÉΓòÉ 2.8. March 16 Release ΓòÉΓòÉΓòÉ
  398.  
  399.  In a FORM, the HTML PASSWORD entry field is now supported. A Password 
  400. attribute can be assigned to the previous ENTRY field object. 
  401.  
  402.  The toolbar has a Pushbutton object. With no parameters, a Pushbutton is named 
  403. SUBMIT and tranmits the form data. A Pushbutton can also be assigned a variable 
  404. name and value that will be transmitted with the rest of the form data. The 
  405. value sets the caption on the button. 
  406.  
  407.  HTML supports a HIDDEN object that contains data (a userid, transaction ID, or 
  408. other handle). It is sent to the browser but is not displayed on the screen. It 
  409. is added to any forms input. This allows the server programs to carry 
  410. information from one transaction to the next. To support this without adding a 
  411. new tool to the toolbar, SpHyDir has added a "hidden" attribute to the 
  412. Pushbutton object. 
  413.  
  414.  A new Extended Attribute named "Variables" has now been added to each HTML 
  415. file with FORMS. This EA identifies the location of any data in the HTML file 
  416. that is associated with a variable name associated with a FORMS object. For 
  417. example, if a Text Entry Field is associated with the variable name PHONENUM, 
  418. there will be an entry in the Variables EA indicating the type of field 
  419. (ENTRY), the variable name (PHONENUM), and the location in the HTML file where 
  420. a previous phone number value might be inserted. The field would be generated 
  421. as: 
  422. <INPUT TYPE="TEXT" NAME="PHONENUM" VALUE=""> 
  423. and the EA would have the byte offset in the file of the first double quote 
  424. following VALUE. 
  425.  
  426.  This form is perfectly valid as a static HTML file. Transmitted as is, the 
  427. phone number field would appear empty. However, if the form is sent out from 
  428. the server by a forms processing program that uses SpHyDir "helper routines", 
  429. and if the PHONENUM variable is also defined in the sending program, then the 
  430. current value of the variable will be inserted into the field. For example, if 
  431. a Rexx program had 
  432. PHONENUM="203-555-1234" and sent the form out with a helper program, then the 
  433. resulting HTML after the insertion would be: 
  434. <INPUT TYPE="TEXT" NAME="PHONENUM" VALUE="203-555-1234"> 
  435.  
  436.  Rexx is a particularly nice language for this purpose because the user program 
  437. doesn't have to specially identify the variables used in the Form. The helper 
  438. routine can query the EA, then check the Rexx symbol table for each variable 
  439. name found in the form to see if there is an existing Rexx variable of the same 
  440. name. To play the same trick with other langauges, such as C, the processing 
  441. program first has to pass the variable and name to the interface routine as in: 
  442. SpHyDir_define("PHONENUM",&phonenum); 
  443.  
  444.  
  445. ΓòÉΓòÉΓòÉ 2.9. March 14 Release ΓòÉΓòÉΓòÉ
  446.  
  447.  SpHyDir now generates HEIGHT and WIDTH tags for Image objects. Netscape 
  448. supports them and is much faster when they are present. HTML 3.0 also includes 
  449. them in the standard. Other browsers will ignore them. SpHyDir ignores these 
  450. attributes when reading HTML in, but when it goes to generate the IMG tag it 
  451. opens the GIF file and reads the image size from the header. If the size of an 
  452. image changes, the HTML can be updated by reading and rewriting any pages that 
  453. reference the image. 
  454.  
  455.  In a related area, the Document Tree window (introduced two days ago) now has 
  456. a File menu with a Generate Tree item. Selecting this item will regenerate the 
  457. root document and all of the subdocuments of the current multi-file tree. This 
  458. makes it simple to change boilerplate (Header and Trailer line) globally or add 
  459. new features (like adding HEIGHT and WIDTH fields to all graphics. 
  460.  
  461.  A user requested keyboard shortcuts for character emphasis. With the Text Edit 
  462. window, select a section of text and use: 
  463. Ctrl-B for Bold 
  464. Ctrl-I for Italics 
  465. Ctrl-E for EM 
  466. Ctrl-C for Cite 
  467. Ctrl-S for Strong 
  468.  
  469.  
  470. ΓòÉΓòÉΓòÉ 3. SpHyDir Project Objectives ΓòÉΓòÉΓòÉ
  471.  
  472.      Produce better quality HTML documents for the World Wide Web while 
  473.       exposing the author to as little HTML syntax as possible. 
  474.  
  475.      Simplify the construction of large documents composed of many small, 
  476.       structurally interrelated hypertext files. 
  477.  
  478.      Automatically generate navigational links, copyright notices, and other 
  479.       standard features at the beginning or end of every document. 
  480.  
  481.      Provide a core set of functions, then allow the user to add features by 
  482.       coding simple external Rexx functions. 
  483.  
  484.      Generate documents that can be published both on the network (in HTML 
  485.       format through the World Wide Web) and in hypertext file format (as INF 
  486.       files viewed under Windows or OS/2). 
  487.  
  488.      Simplify the development of Web "forms." In particular, provide direct 
  489.       support that simplifies Rexx-based query programs running under GoServe 
  490.       2.0 (the free IBM Gopher/Web server for OS/2), although the forms can be 
  491.       used with any CGI program running on other servers. 
  492.  
  493.   SpHyDir is the Structured Professional Hypertext Directory Manger. It is 
  494.  Structured because it views a Web not as a collection of ASCII files with 
  495.  format instructions, but rather as a collection of documents with chapters, 
  496.  sections, and subsections. It is Professional because it aims to manage a 
  497.  large block of material and not to help the novice design a single home page. 
  498.  It is Hypertext because it helps to manage links between documents, structure 
  499.  across documents, and links to remote information sources. It is a Directory 
  500.  manager because it simplifies the maintenance of logical documents composed of 
  501.  many small HTML files in the same directory. 
  502.  
  503.   SpHyDir is also an experiment in using IBM's Workplace interface within an 
  504.  application program. Although IBM originally that the Workplace model be used 
  505.  to handle application data objects as well as System components, there are 
  506.  only a few examples of this use and they have not been entirely successful. 
  507.  Whenever possible, SpHyDir follows the Workplace model to decide how things 
  508.  should be done and how they should look. This makes SpHyDir a truly "native" 
  509.  OS/2 program. 
  510.  
  511.   SpHyDir does not claim to understand or process all "valid" Web documents. 
  512.  There is a widely held view that the HTML language in which Web documents are 
  513.  expressed is intended to provide formatting information. SpHyDir tries to use 
  514.  it to extract document structure. In particular, SpHyDir assumes that a 
  515.  "heading" introduces a chapter, section, or subsection. When someone uses 
  516.  heading tags just to get big letters, SpHyDir will make all sorts of wrong 
  517.  assumptions. This is not a bug and it is unlikely to ever be changed. SpHyDir 
  518.  approaches the question of Web documents with an entirely different 
  519.  philosophy. 
  520.  
  521.   The Web provides universal access to sophisticated information from all 
  522.  computers on the Internet. Of necessity, this involves some compromise in 
  523.  function and speed. There are also native hypertext formats (HLP, INF) that 
  524.  provide many of the same structural features, faster local performance, and 
  525.  extra features such as keyword search. SpHyDir also generates IPF source files 
  526.  that can be compiled into OS/2 HLP files and INF files. The primary purpose of 
  527.  this feature was to provide a version of this document that could double as 
  528.  HLP to the SpHyDir program. 
  529.  
  530.  
  531. ΓòÉΓòÉΓòÉ 4. The SpHyDir Idea ΓòÉΓòÉΓòÉ
  532.  
  533.  SpHyDir is designed to behave like the OS/2 Workplace, and to interact with 
  534. it. However, SpHyDir is an ordinary application program written in VX-Rexx, not 
  535. a DLL written to extend the Workplace environment. SpHyDir objects are created 
  536. while the application is running and they disappear when the program ends. They 
  537. cannot be dragged out of the SpHyDir windows to the desktop (except to the 
  538. "Shredder" which signals SpHyDir to delete them). 
  539.  
  540.  SpHyDir doesn't have an Open File dialog. Such dialogs are rather ugly when 
  541. the same files can be more easily located in Workplace folders. SpHyDir opens a 
  542. file when a file icon is dropped into the Workarea. 
  543.  
  544.  The OS/2 Workplace Shell folders that contain files and other folders. This 
  545. view stops at the individual file. Normally when you open a file you run the 
  546. system editor, a word processor, or a spreadsheet. However, when an HTML file 
  547. is dragged over and dropped on the open SpHyDir workarea window, it opens up 
  548. and presents a tree of document elements. This gives the impression that the 
  549. HTML File was itself a kind of Folder that contained internal components. 
  550.  
  551.  The document is presented as an ordered sequence of components organized in a 
  552. logical tree. There are different icons for each type of component: Sections, 
  553. Paragraphs, Images, Numbered and Unnumbered Lists, Preformatted Example, and so 
  554. on. The tree structure reflects the view that some components "contain" other 
  555. components. For example, a chapter or section contains all the other elements 
  556. that fall within a particular topic. Each list contains a sequence of points. 
  557.  
  558.  IBM and Apple are working on a strategy called "OpenDoc."  A document is 
  559. viewed as a collection of parts with different types.  A Text Part has fonts 
  560. and a spelling checker.  An Image Part has cropping and color correction.  A 
  561. Table Part works as a spreadsheet.  Since Web documents are built from 
  562. different types of components, it seemed at first that OpenDoc might be 
  563. directly useful. However, OpenDoc assumes that each part can be precisely 
  564. positioned in two dimensions on the viewing area. Web documents, however, have 
  565. to be filtered through HTML which only allows the linear definition of the 
  566. document as an ordered sequence of components. 
  567.  
  568.  The SpHyDir presentation of the document as an ordered, but structured, 
  569. sequence of component objects seems to be the best compromise between HTML 
  570. constraints and modern object-oriented compound document thinking. Making the 
  571. object behavior consistent with the OS/2 Workplace, and then interacting with 
  572. real Workplace objects, simplifies the user interface. 
  573.  
  574.  
  575. ΓòÉΓòÉΓòÉ 5. SpHyDir is not for Everyone ΓòÉΓòÉΓòÉ
  576.  
  577.  SpHyDir was written after many months of frustration dealing with other Web 
  578. authoring environments. It will develop to meet the needs of PC Lube and Tune 
  579. and potentially a large group of other Web authors. It was not written to be a 
  580. "product" in the usual sense of that word because the environment of the Web is 
  581. changing too rapidly. When someone talks about HTML, is that Version 1, Version 
  582. 2, Version 3, or Netscape extensions? It isn't possible to really build a 
  583. "product" against a target that changes and is vaguely defined. 
  584.  
  585.  The purpose of SpHyDir is to improve the quality and scope of the HTML 
  586. generated by ordinary users, not to meet the exacting requirement of the HTML 
  587. expert. SpHyDir can encourage the user to add extra features that might 
  588. otherwise be ignored (such as ALT text for an image) and it can automatically 
  589. generate features that would be tedious to code manually (such as HEIGHT and 
  590. WIDTH on an image). Because the HTML is generated automatically, the user 
  591. cannot make simple typographic or syntax errors in the HTML tags. However, 
  592. SpHyDir doesn't claim to make errors impossible. 
  593.  
  594.  The author develops SpHyDir during spare time. Mostly, this means over 
  595. weekends. The SpHyDir project aims to deliver updates each Monday. When bugs 
  596. are reported, and assuming that there are no major updates under way, fixes may 
  597. be posted to the server in midweek. There are no plans to have formal releases, 
  598. so a version of SpHyDir is typically known by the date on the EXE file after it 
  599. is unzipped. To know if there is a new version, use FTP to check the date of 
  600. the ZIP file on the server. 
  601.  
  602.  SpHyDir can be dangerous. When it begins to generate HTML from the edited 
  603. data, it copies the previous file to a backup directory. However, save the file 
  604. twice and the original data is lost. 
  605.  
  606.  This is important because SpHyDir is not an HTML Editor. It reads HTML and 
  607. proposes a structural representation of the original data. When done, it writes 
  608. a new file containing its own HTML to reflect this structure and any changes. 
  609. If the original file used constructs that SpHyDir doesn't support, the 
  610. resulting file can lose information. Keep the original data. Compare it to the 
  611. output of SpHyDir before discarding the old files. 
  612.  
  613.  SpHyDir is not written tightly enough to trap its own syntax errors and 
  614. recover. Rexx simply stops the program when it encounters a problem. Since Rexx 
  615. is an interpreted language, syntax errors may only be detected during 
  616. execution. When the program aborts, it can leave the output file half-written. 
  617. This is the primary reason for making a backup of the previous copy of the file 
  618. before generating a new copy. 
  619.  
  620.  
  621. ΓòÉΓòÉΓòÉ 6. How to Get SpHyDir ΓòÉΓòÉΓòÉ
  622.  
  623.  SpHyDir is a copyrighted program which is a personal project and property of 
  624. the author. It is made available on the network and may be used free of charge 
  625. under a license terms distributed with the package. Essentially, you agree to 
  626. leave in all HTML documents produced by SpHyDir the credit that appears at the 
  627. bottom of all of these Web pages: "This document generated by SpHyDir, another 
  628. fine product of PC Lube and Tune." 
  629.  
  630.  This arrangement is called "Personal SpHyDir." If a large organization wants 
  631. to generate more professional looking documents and omit the credit, other 
  632. licensing arrangements can be made with the author. 
  633.  
  634.  The following references are correct. They work with Web Explorer and Netscape 
  635. and conform to current HTTP and HTML standards. If they don't work on your 
  636. Browser, get a better Browser. Otherwise, you can fetch the files with FTP from 
  637. pclt.cis.yale.edu. They are in the SPHYDIR subdirectory of PUB. If you have 
  638. trouble with your browser, then read the trailing tutorial on Web handling of 
  639. binary files to figure what went wrong. 
  640.  
  641.  With a good browser, just select the name of any desired files and save them 
  642. to disk on your machine.  All are compressed with the ZIP utility from the 
  643. INFOZIP project. 
  644.  
  645.      SPHYDIR.ZIP - The basic SpHyDir package. Includes the program, some 
  646.       sample External Rexx "XSpO" scripts, a proposed starting point for the 
  647.       GOFILTER needed by the GOSERVE server on OS/2, and the shared code Rexx 
  648.       segments for easy forms processing. 
  649.  
  650.      VROBJ21B.ZIP - The VX-Rexx 2.1B runtime library, VROBJ.DLL. This file 
  651.       must be in your LIBPATH for SpHyDir and many other freeware and shareware 
  652.       packages to run. You may already have this file. SpHyDir will run on 2.1B 
  653.       and later versions of this runtime module. 
  654.  
  655.      SPHYDOC.ZIP - A copy of all these HTML pages and their associated GIF 
  656.       files. Unlike other PCLT documents, the SpHyDir documents may be 
  657.       downloaded and copied. This provides a good example of lots of SpHyDir 
  658.       use. 
  659.  
  660.      GBM.ZIP - A freeware package written by an IBM employee and distributed 
  661.       through a number of sources. This OS/2 program converts between a number 
  662.       of popular image formats (GIF, TIFF, XBM, BMP, etc.) and can crop or 
  663.       resize images. Use this package to convert BMP or Clipboard images into 
  664.       GIF suitable for including in a Web document. 
  665.  
  666.  
  667. ΓòÉΓòÉΓòÉ 6.1. Distributing Binaries through the Web ΓòÉΓòÉΓòÉ
  668.  
  669.  Fetching a ZIP file through the Web should be a trivial matter. Unfortunately, 
  670. a number of popular Browsers (particularly NCSA Mosaic) don't do a reasonable 
  671. job of handling such files. 
  672.  
  673.  Web Servers support the HTTP (HyperText Transfer) Protocol. The first version 
  674. of HTTP (0.9) simply transmitted Web files back to the reader. The current 
  675. standard (1.0) preceeds each file with a statement of its data type in Internet 
  676. MIME style. This allows the Browser to distinguish between HTML, plain Text, 
  677. ZIP binaries, and MPEG movies. 
  678.  
  679.  Web Browsers can also read files using the FTP protocol. With FTP, the server 
  680. doesn't provide any indication of the data type, but the file name contains an 
  681. extension that usually indicates the type of data (*.ZIP, *.JPG, *.GIF, etc.). 
  682. In the early days of the Web, HTTP was generally used to distribute HTML files, 
  683. and FTP was generally used to distribute other binary formats. 
  684.  
  685.  No Operating Systems record the MIME file type in the disk directory.  So most 
  686. HTTP servers look at the file type and create a MIME data type based on the 
  687. extension of the file requested.  Thus if a browser fetches SPHYDIR.ZIP using 
  688. FTP, it will decide that it is a ZIP file because of the *.ZIP extension, but 
  689. it it fetches the same file using HTTP from the same server, the the Server 
  690. will look at the *.ZIP extension, decide that it is a ZIP file, send the MIME 
  691. header with that information, and the Browser will react accordingly. 
  692.  
  693.  The problem is that a lot of Web Browsers have developed the convention that 
  694. anything that comes over HTTP protocol should be either displayed on the screen 
  695. or played through the speakers, while files that come over FTP can be saved to 
  696. disk if they have a file extension that makes that seem right.  Nothing in the 
  697. standards says any such thing.  Architecturally, a URL can call up ftp:, 
  698. gopher:, or http: protocols to fetch a file.  What you do with the file should 
  699. then be determined by the type of data and not by the protocol used to fetch 
  700. it.  But it is hard to convince some Browsers to save a ZIP file to disk if it 
  701. came over HTTP protocol.  In most cases, the ZIP file is actually on disk in 
  702. the Browser's CACHE directory, but it may be hard to find.  When it doubt, fall 
  703. back on plain FTP. 
  704.  
  705.  
  706. ΓòÉΓòÉΓòÉ 7. Using SpHyDir ΓòÉΓòÉΓòÉ
  707.  
  708.  If you begin by expecting every document element (every paragraph, image, 
  709. list, or point) to act like a Workplace file, then you have a fairly good 
  710. starting view of how to use SpHyDir. The only complex point is positioning new 
  711. elements in the tree, since OS/2 objects don't have an order. 
  712.  
  713.  
  714. ΓòÉΓòÉΓòÉ 7.1. How do I edit an HTML document? ΓòÉΓòÉΓòÉ
  715.  
  716.  There are three ways to start SpHyDir on an existing HTML file. 
  717.  
  718.    1. If the SpHyDir Workarea is open and is either empty or the previous file 
  719.       can now be discarded, then drag the WPS icon of the file over and drop it 
  720.       in the whitespace of the workarea (not on any individual icon or 
  721.       caption).  SpHyDir will abandon any old file and will read in the new 
  722.       HTML. 
  723.  
  724.    2. If SpHyDir is not running, but a WPS Program Object has been constructed 
  725.       for it, then drop any WPS Icon for an HTML file on the SpHyDir program 
  726.       icon.  SpHyDir will start up and read in the file. 
  727.  
  728.    3. It is possible to associate a Program Object for SpHyDir with files of 
  729.       the type *.HTM or *.HTML.  Then SpHyDir will be automatically launched 
  730.       when any such file is opened.  However, this is not always the right 
  731.       thing. Sometimes it is useful to launch Web Explorer to view the file 
  732.       after it has been formatted.  It is also sometimes useful to read HTML 
  733.       files into the System Editor and few the raw tags.  So SpHyDir is not the 
  734.       only tool that can be used to view such files. 
  735.  
  736.  
  737. ΓòÉΓòÉΓòÉ 7.2. How do I start a new HTML file? ΓòÉΓòÉΓòÉ
  738.  
  739.  Drag the first tool (the one that looks like a book) from the upper left 
  740. corner of the toolbar and drop it on the whitespace of the Workarea.  SpHyDir 
  741. clears the workarea to start a new document.  A window pops up asking for the 
  742. name that the file will be assigned in the HTML library (the set of directories 
  743. under the starting point configured in the SET HTMLLIB= environment variable). 
  744. Do not retype the disk letter or upper directories.  Just type the Unix style 
  745. (forward slashes "/") name of that the new file will have relative to the top 
  746. of the library.  SpHyDir will create a new Document object and a new Section. 
  747.  
  748.  
  749. ΓòÉΓòÉΓòÉ 7.3. How do I make changes? ΓòÉΓòÉΓòÉ
  750.  
  751.  The text in a paragraph, list point, or definition is treated like the 
  752. "contents" of the document object. Double-click on the paragraph or point 
  753. object and it appears to "open", presenting the Text Edit window in which 
  754. changes can be typed. To speed things up, the text edit window also has buttons 
  755. to go forward to the next paragraph, back to the previous one, and to insert a 
  756. new paragraph after the current one and begin editing it. 
  757.  
  758.  Section titles, the alternate text of images, and the term being defined in a 
  759. definition list are treated as if they were object Names (like the file name 
  760. under a Workplace file icon). In some cases you can use WPS file renaming 
  761. conventions (point to a Section title, hold down Alt while clicking on the 
  762. text, then change the text in place and click somewhere else at the end). 
  763. However, is rather awkward in practice. There is an entry area at the top right 
  764. of the workarea window. It can be used to edit the "name" of the currently 
  765. selected document element in the tree below. 
  766.  
  767.  
  768. ΓòÉΓòÉΓòÉ 7.4. How do I enter special characters? ΓòÉΓòÉΓòÉ
  769.  
  770.  If the question applies to the three ordinary ASCII characters ("&", "<", and 
  771. ">") that HTML uses to delimit control features, just type them. SpHyDir 
  772. removes the HTML control features when the document is read in and recreates it 
  773. when the document is regenerated. 
  774.  
  775.  For foreign language (ISO 8859-1) characters, SpHyDir currently doesn't have 
  776. explict support. The author is in search of an appropriate entry area control 
  777. or simple text editor that will allow these characters to be displayed and 
  778. edited directly. 
  779.  
  780.  Because the paragraph boundaries are represented by objects, the user can 
  781. enter a line break (<BR>) by simply typing Return to split the current text. 
  782.  
  783.  
  784. ΓòÉΓòÉΓòÉ 7.5. How do I delete objects? ΓòÉΓòÉΓòÉ
  785.  
  786.  Drag the object to the WPS shredder. Alternately, select the object and press 
  787. Ctrl-D. 
  788.  
  789.  
  790. ΓòÉΓòÉΓòÉ 7.6. How do I add new elements to the document? ΓòÉΓòÉΓòÉ
  791.  
  792.  At the top left of the workarea window there are a set of icons alternately 
  793. viewed as the "Toolbar" and as "Templates". They act to the document much like 
  794. the OS/2 Template folder acts to the rest of the workplace. Drag the icon for a 
  795. Section, Paragraph, Image, List, or other tool and drop it where you want the 
  796. new element to go. This creates an empty element that needs to be filled in. 
  797.  
  798.      When the paragraph tool is dropped, the edit window opens and you may 
  799.       type text. You can also paste text from the Clipboard. Dropping an 
  800.       external file on the Text Editor window is ambiguous. Some files have 
  801.       long lines with CR-LF at the paragraph boundaries, some have blank lines 
  802.       at paragraph boundaries and CR-LF is a line break. SpHyDir will shortly 
  803.       be extended to support an XSpO (external Rexx program) interface to 
  804.       handling files dropped on the Text Edit window. 
  805.  
  806.      When the image tool is dropped, it creates an empty Image object. Drag a 
  807.       GIF file over from one of the OS/2 disk folders and drop it on the object 
  808.       to assign a file. Add alternate text in the entry field at the top of the 
  809.       workarea. Pushbuttons allow you to select the alignment of the image with 
  810.       any trailing text. 
  811.  
  812.  
  813. ΓòÉΓòÉΓòÉ 7.7. How do I create links to other files? ΓòÉΓòÉΓòÉ
  814.  
  815.  To create a hypertext link to a file in the local library, open the Workplace 
  816. folder containing the target file. Now hold Ctrl-Shift down and drag the icon 
  817. of the file over and drop it on the paragraph, point, or image from which the 
  818. link is to be made. If you drop on an image, then there is no further work. 
  819. Images can have only one hypertext link and the entire image is the link. If 
  820. you drop on a paragraph or point, then the Hotword Selection window opens 
  821. displaying the available text. Drag the mouse to "select" the word or phrase 
  822. that will represent the link. Click the OK button. Hotwords are delimited in 
  823. the text by an opening and closing triangle character. You may change the 
  824. contents of the hotword area, but do not delete the funny triangle characters 
  825. or SpHyDir will get confused. 
  826.  
  827.  SpHyDir has a Link Manager window to handle URL links to Web documents out 
  828. there somewhere in the network. The Link Manager displays documents in a 
  829. browser hotlist. A supplied XSpO (an external Rexx program) can be dropped on a 
  830. paragraph, point, or image to create a link to whatever network document the 
  831. IBM Web Explorer is currently displaying. 
  832.  
  833.  
  834. ΓòÉΓòÉΓòÉ 7.8. How do I save the file and quit? ΓòÉΓòÉΓòÉ
  835.  
  836.  When the workarea has the input focus, press F2 to generate HTML and continue 
  837. editing, F3 to quit without generating, and F4 to generate HTML and then quit. 
  838. The status message at the bottom of the window will indicate that HTML is being 
  839. generated and then has been written. If you press F2 and nothing happens, then 
  840. click once on the workarea to make sure it has the focus. If you try to quit 
  841. and have modified the file in the Workarea, a message will pop up asking 
  842. whether you want to Generate or Discard the file. 
  843.  
  844.  
  845. ΓòÉΓòÉΓòÉ 7.9. How do I move paragraphs around? ΓòÉΓòÉΓòÉ
  846.  
  847.  You can drag an individual paragraph around, but only within the visible 
  848. window. To move more data, to move a greater distance, or to move between 
  849. files, there is special support to mark a range of objects, copy them to a 
  850. "clipboard" and paste them somewhere else. 
  851.  
  852.  SpHyDir wants to create the image of selecting a range of objects, moving them 
  853. around, copying them to the clipboard, and pasting them back into the file. 
  854. However, the native support for selection, movement, and the real OS/2 
  855. clipboard are not able to handle this problem correctly. Reluctantly, SpHyDir 
  856. has been forced to reinvent some of this infrastructure. 
  857.  
  858.  The user can select a range of objects to move within a document or to copy to 
  859. another document. First select one object and press Alt-L as if you were 
  860. establishing a "line mark" in the EPM or Kedit editors. Once you begin to mark 
  861. a section of the document, you may extend the marked area forward or backward, 
  862. but only within the current level of the document tree. The mark can be 
  863. extended over but not into lists or subsections. Nor can the start or end of 
  864. the mark be extended outside the section or list in which it is started. 
  865.  
  866.  Marking creates two new objects: Mark Start and Mark End. Initially these 
  867. objects are placed around the currently selected object when Alt-L is pressed. 
  868. The Mark objects can then be "slid" forward or backward along the line that 
  869. represents the current level of the tree. They cannot be slid into a subsection 
  870. or list (to a lower level) nor can they be slid outside the section or list in 
  871. which they started. The Mark can also be automatically adjusted by selecting 
  872. another object at the same level of the tree and pressing Alt-L again 
  873. (expanding the scope of the Mark just as additional lines are added in the EPM 
  874. editor when you move to another line and press Alt-L a second time). 
  875.  
  876.  Once a section has been marked, you can copy it to the Clipboard by pressing 
  877. Ctrl-Ins (the standard OS/2 keyboard sequence for Copy). However, the OS/2 
  878. Clipboard really doesn't know how to hold SpHyDir objects, so the same effect 
  879. is achieved by opening a new Window and copying all of the objects between the 
  880. two marks (including all the objects contained in subsections and lists) from 
  881. the workarea window to a second container that SpHyDir calls "The Clipboard". 
  882. In the current release, the Clipboard window becomes visible (for debugging) 
  883. though it can be minimized or can be dragged over to the side of the desktop. 
  884.  
  885.  The objects in the Clipboard can then be moved to another part of the original 
  886. document by selecting a destination object and pressing Shift-Ins (the OS/2 
  887. standard for Paste). They can be copied to another file by dragging another HTM 
  888. file to the workarea (replacing the original source document) and then pasting 
  889. from the Clipboard to a second document. 
  890.  
  891.  However, Clipboard objects cannot be copied to another part of the same 
  892. document. This fell out from the way the Clipboard got coded and, at the 
  893. moment, it seems to be a useful feature. When the user marks objects and 
  894. presses Ctrl-Ins, there were two programming choices. One choice copies all of 
  895. the objects to the Clipboard. The alternative creates what is essentially a 
  896. Shadow of the original record in the clipboard (what VX-Rexx calls a "shared 
  897. record"). Like the Workplace shadow, the two objects are actually different 
  898. views of the same data. If you were to edit the text of a paragraph after 
  899. copying it to the SpHyDir Clipboard, the text of the Clipboard copy would also 
  900. change. However, while a Workplace shadow cannot exist when the original is 
  901. deleted, a VX-REXX shared record continues to exist until all of its related 
  902. objects have been deleted. Thus the Clipboard copy of the data continues to 
  903. exist after the original object in the workarea has been deleted or the entire 
  904. document has been replaced. 
  905.  
  906.  A shared record can exist in two different containers, but there can be only 
  907. one copy of the record per container. By choosing to use Shadows in the 
  908. Clipboard instead of full copies, SpHyDir does not support duplicating large 
  909. blocks of text within the same Hypertext document. 
  910.  
  911.  When you select another location and press Ctrl-Ins, the SpHyDir Paste tries 
  912. to copy the shared record from the Clipboard back to the original document. 
  913. However, since there is already a copy of the record in the workarea and no 
  914. container can have two copies of the same record, the Paste operation actually 
  915. moves the old record from its previous location to the new position. If you 
  916. delete the document in the workarea and load a new document (even a new copy of 
  917. the original document) then a new set of records are created. Now the Clipboard 
  918. has the only copy of the old records and Paste copies the information into the 
  919. new document. 
  920.  
  921.  I am a bit suspicious of any feature that takes this much time to explain. On 
  922. the other hand, a hypertext document should be short and it doesn't make a lot 
  923. of sense to duplicate large blocks of text within such a file. There is a 
  924. strong sense that the way this Mark and Clipboard logic works is probably the 
  925. Right Way to handle this particular problem with this particular set of data. 
  926. Only by gaining experience with this technique will it become clear if this is 
  927. really the best approach. 
  928.  
  929.  Note that the SpHyDir specialized Clipboard, Cut, and Paste apply only to the 
  930. management of objects from the Workarea. Within the Text Edit window opened by 
  931. double-clicking a paragraph or point, the behavior of text selection, Cut, 
  932. Copy, and Paste is completely normal and operates through the normal OS/2 
  933. clipboard. Text data can be exchanged between another OS/2 program and the Text 
  934. Edit window through the ordinary cut and paste mechanisms. 
  935.  
  936.  
  937. ΓòÉΓòÉΓòÉ 8. The Toolbar ΓòÉΓòÉΓòÉ
  938.  
  939.  At the top of the Workarea there are a collection of icons that represent the 
  940. Toolbar (or Template) area. These items can be dragged into the document to 
  941. create new elements. In some cases, the tool can also be double-clicked to open 
  942. a secondary window. 
  943.  
  944.  
  945. ΓòÉΓòÉΓòÉ 8.1. The Document Tool ΓòÉΓòÉΓòÉ
  946.  
  947.  If the workarea is empty, then dropping the document tool in it creates a new 
  948. document. SpHyDir prompts for the name of the new file (which should be in the 
  949. library and should end in HTM or HTML). 
  950.  
  951.  Within an existing document, the DOC tool creates a subdocument link to 
  952. another HTML file. The user can always link another HTML file to any hotword in 
  953. any paragraph or point in the text. However, a Subdocument link is used to 
  954. build a single large logical document out of a sequence of smaller files. 
  955.  
  956.  A Subdocument object can go anywhere, but it will not make much sense or 
  957. produce good results unless all the Subdocument are at the end of a file. 
  958.  
  959.  Drag the Document Tool over and drop it in the file as you would create a 
  960. paragraph or point. The Subdocument definition is then completed by dragging 
  961. the WPS icon for an HTM or HTML file over and dropping it on the newly created 
  962. object. If the dropped file was previously processed by SpHyDir, the Title of 
  963. that document can be extracted from the Extended Attributes of the file and 
  964. will appear next to the Subdocument icon. 
  965.  
  966.  Within the current file, the Subdocument object behaves like a Paragraph whose 
  967. entire contents is the TITLE of another HTML file and where that TITLE text is 
  968. a hypertext link to the other file. 
  969.  
  970.  However, the Subdocument structure is also stored as Extended Attributes of 
  971. the files in the library. Each *.HTM or *.HTML file has pointers to the files 
  972. that it claims as subdocuments and to its "parent" (a file that claims it as a 
  973. subdocument). The order in which the Subdocument objects appear in the parent 
  974. establishes a Next and Previous ordering to the sudocument HTML files, which 
  975. SpHyDir maintains and can use to generate uniform Headers and Trailers. 
  976.  
  977.  
  978. ΓòÉΓòÉΓòÉ 8.2. The Section Tool ΓòÉΓòÉΓòÉ
  979.  
  980.  Sections correspond to document elements introduced by an H1...H6 HTML tag. 
  981. Although SpHyDir recognizes these tags on input, it discards their original 
  982. level number. When HTML is generated, the highest level section is given an H1 
  983. tag, then next level becomes H2, and so on. Sections have no explicit ending 
  984. delimiter, so a section extends till the end of the document or until a new 
  985. section of the same or a higher level is encountered. SpHyDir will probably 
  986. work best if the entire HTML file is contained in a single top level (H1) 
  987. section. 
  988.  
  989.  
  990. ΓòÉΓòÉΓòÉ 8.3. The Paragraph Tool ΓòÉΓòÉΓòÉ
  991.  
  992.  The Paragraph Tool produces an ordinary paragraph of text. Actually, 
  993. paragraphs contain text, formatting tags (bold, italics,etc.), and hypertext 
  994. links to other files and documents keyed to hotword phrases. 
  995.  
  996.  
  997. ΓòÉΓòÉΓòÉ 8.4. The Image Tool ΓòÉΓòÉΓòÉ
  998.  
  999.  The Image Tool represents a graphic insert. First, drag and drop the image 
  1000. tool to the location in the document where the image is logically positioned. 
  1001. Then finish the definition by dropping the WPS icon of a GIF file on top of the 
  1002. Image object. Currently SpHyDir requires the GIF data type (XBM and JPG may be 
  1003. added later). Since the IBM IPF system doesn't support GIF, generated IPF 
  1004. source uses the same file name and an extension of BMP. GIF files can be 
  1005. converted to BMP files using the GBM utilities or any of a number of other 
  1006. graphics programs. 
  1007.  
  1008.  HTML authors are reminded that there are still a number of disadvantaged users 
  1009. who try to surf the net using charcter mode Unix. To accomodate such people, an 
  1010. Image should have alternate text (represented by the ALT attribute). The entry 
  1011. area at the top of the workarea can be used to type a phrase that will be 
  1012. displayed as alternate text. 
  1013.  
  1014.  By default, an Image object will be displayed by itself. This is probably the 
  1015. best choice for large images. An icon, on the other hand, should be displayed 
  1016. inline (as is the Image icon itself at the start of this section). When an 
  1017. Image object is selected, a "spin field" appears under the entry area at the 
  1018. top of the work area. Within this field, the selection "None" for alignment, 
  1019. places the image by itself. Otherwise, the text of a subsequent paragraph will 
  1020. appear to the right of the image. Top, Middle, and Bottom are standard HTML 
  1021. alignments. Left is an alignment option supported by Netscape. 
  1022.  
  1023.  
  1024. ΓòÉΓòÉΓòÉ 8.5. The Ordered List Tool ΓòÉΓòÉΓòÉ
  1025.  
  1026.  An Ordered List Tool contains a sequence of numbered points. The list pushes 
  1027. down the tree structure one level. Drag the Point Tool and drop it in the list. 
  1028. Each Point acts much like a paragraph. Lists may also include Paragraph Objects 
  1029. (unexpected but widely used) and Subdocument Objects (useful when you want to 
  1030. number the chapters). A list may not contain a Section object! 
  1031.  
  1032.  
  1033. ΓòÉΓòÉΓòÉ 8.6. The Unordered List Tool ΓòÉΓòÉΓòÉ
  1034.  
  1035.  An unordered lists contains unnumbered points, generally delimited by a 
  1036. "bullet" character. Unordered lists follow the same rules as the previous 
  1037. discussion of Ordered Lists. 
  1038.  
  1039.  
  1040. ΓòÉΓòÉΓòÉ 8.7. The Definition (Glossary) List Tool ΓòÉΓòÉΓòÉ
  1041.  
  1042.  A Definition List defines a set of terms. Each item in the list is preceeded 
  1043. by the term to be defined, set off from the definition by different levels of 
  1044. indentation. The Point Tool is used for definition lists as well. The Point 
  1045. Tool changes its behavior depending on the type of list in which it is placed. 
  1046.  
  1047.  
  1048. ΓòÉΓòÉΓòÉ 8.8. The Point Tool ΓòÉΓòÉΓòÉ
  1049.  
  1050.  The icon of a hand making a "point" represents the general list item. An item 
  1051. in a numbered or unnumbered list simply has text. An item in a Definition List 
  1052. also has the term or phrase being defined. This term can be entered in the 
  1053. Entry area at the top right of the workarea. 
  1054.  
  1055.  
  1056. ΓòÉΓòÉΓòÉ 8.9. The Target Tool ΓòÉΓòÉΓòÉ
  1057.  
  1058.  The Target object generates a permanent public hypertext target. Type a name 
  1059. (preferably without blanks) in the entry area at the top of the workarea. This 
  1060. name can then be used in hypertext links from other documents in the library. 
  1061. Although SpHyDir may generate internal targets for section headers (to make the 
  1062. TOC work), these names will change if the section is renamed. A Target object 
  1063. is only renamed if the user changes it, so it becomes a more reliable target 
  1064. for long term use. 
  1065.  
  1066.  There are three views about hypertext targets. HTML allows any word, even any 
  1067. letter, to be the target of a hypertext link. This level of precision is 
  1068. meanless to the viewer. IPF requires a hypertext link to jump to a header that 
  1069. generates its own Window. In HTML terms, the IPF strategy would only allow HTML 
  1070. files to be targets and not individual subsections. This explains why OS/2 HLP 
  1071. and INF files seem to be fragmented into silly, unmanagably small individual 
  1072. panels. 
  1073.  
  1074.  SpHyDir tries to split the difference. A Target is an object, so it can only 
  1075. go in front of Section, Paragraph, Image, List, or Point objects. When SpHyDir 
  1076. encounters a target while reading HTML, it moves in in front of the paragraph 
  1077. or point in which it was found. When SpHyDir generates IPF, however, it will 
  1078. probably have to move the reference back to the start of the current Section. 
  1079.  
  1080.  
  1081. ΓòÉΓòÉΓòÉ 8.10. The Preformatted Text Tool ΓòÉΓòÉΓòÉ
  1082.  
  1083.  Within an ordinary paragraph, line breaks and multiple blanks are ignored. The 
  1084. Preformatted Text object is used for examples where the lines and spaces are 
  1085. important. In most browsers, Preformatted Text is rendered in a font with 
  1086. characters of equal width. 
  1087.  
  1088.  
  1089. ΓòÉΓòÉΓòÉ 8.11. The Forms Tools ΓòÉΓòÉΓòÉ
  1090.  
  1091.  The Form Tool creates an interactive area in which the Web user can enter data 
  1092. to submit a request or query. A Form can include all of the previous document 
  1093. objects, and data fields from the bottom row of the toolbar. To process a form, 
  1094. the server must execute a program written by the form designer. This makes the 
  1095. use of Forms an advanced topic that will be described in a separate section. 
  1096.  
  1097.  
  1098. ΓòÉΓòÉΓòÉ 8.12. Missing Tools ΓòÉΓòÉΓòÉ
  1099.  
  1100.  There are other document elements that are not used frequently enough to 
  1101. warrant a place on the Toolbar. In particular, the Horizontal Rule <HR> tag is 
  1102. generated by positioning at a section or paragraph, holding Alt and pressing H. 
  1103. The line goes in front of the selected object. 
  1104.  
  1105.  
  1106. ΓòÉΓòÉΓòÉ 9. The Problem of Position ΓòÉΓòÉΓòÉ
  1107.  
  1108.  SpHyDir would be simple if the VX-Rexx and OS/2 programming interface allowed 
  1109. the user to drop tools and components in between two existing document 
  1110. elements. This would clearly indicate where the new element is to go. However, 
  1111. the environment requires the tools, files, and other objects to be dropped on 
  1112. top of existing components. This forces SpHyDir to invent some rules about 
  1113. positioning. 
  1114.  
  1115.  A Target is a label for the thing that follows it. If you drop a Target on a 
  1116. paragraph or section, then it makes sense to assume that the Target should go 
  1117. in front of whatever you drop it on. When a hypertext reference is made to the 
  1118. target name, the following document component will be what shows up on the 
  1119. screen after the jump. You may not drop a Target on the Document object that is 
  1120. the first object in the tree, since there is no "before" to place the Target 
  1121. and because the start of the document doesn't need any label, the filename will 
  1122. do fine to identify it. 
  1123.  
  1124.  Sections and Lists contain things. In the Workplace, if you drop a file on the 
  1125. icon of a folder, the file goes into the folder. So the normal behavior is that 
  1126. if you drop anything (other than a Target) on a Section or a List, then the new 
  1127. element is added inside that Section or List in front of anything already 
  1128. there. 
  1129.  
  1130.  If you drop something on a Paragraph, Image, or Point then the new item goes 
  1131. after the thing you dropped it on. Thus to add a new Point to the end of an 
  1132. existing list, drop the Point tool on the last Point in the list. To add a new 
  1133. Point to the beginning of a list, drop the Point tool on the parent List 
  1134. object. 
  1135.  
  1136.  These rules seem to cover all but two cases. Lists can be nested inside other 
  1137. lists. When this occurs, there is no way to add a new outer point after the end 
  1138. of a nested inner list because every time you try to drop a point on the inner 
  1139. list icon the new point is positioned inside the inner list instead of after it 
  1140. in the outer list. Similarly, there is no way to add one section after another 
  1141. because whenever you drop something on a section it goes inside it and not 
  1142. behind it. So there is an extra rule that if you hold down Ctrl when dropping a 
  1143. Point on a List the Point goes after the list, and if you hold down Ctrl when 
  1144. dropping the Section tool on an existing Section, the new Section goes behind 
  1145. the current section. This is not entirely satisfactory. A section can go on for 
  1146. many screens, and it it somewhat unexpected to have to go many screens back to 
  1147. the start of a section in order to drop something on the section object and add 
  1148. it many screens down after the section end. I am waiting for a better idea to 
  1149. come to mind. 
  1150.  
  1151.  Originally, the idea would be that Ctrl-dropping a tool placed the tool after 
  1152. the thing on which you dropped it. That seemed like a good rule, but it doesn't 
  1153. work with Sections because you can't put a paragraph, image, or list after a 
  1154. Section. Sections don't end, you see, until a new Section begins (in HTML 
  1155. terms, a section ends when a new H1...H6 header is encountered). The only thing 
  1156. that you can put behind a section is another Section. Everything else that you 
  1157. try to put behind the section ends up inside it anyway. 
  1158.  
  1159.  
  1160. ΓòÉΓòÉΓòÉ 10. Managing Links ΓòÉΓòÉΓòÉ
  1161.  
  1162.  Most HTML editors expect the user to type in the document referenced (the URL) 
  1163. in order to create a hypertext link. Since it is easy to make a mistake, 
  1164. authors are urged to test their documents thoroughly. SpHyDir provides a 
  1165. simpler and more reliable method of constructing links. 
  1166.  
  1167.  Links to other files in the same library can be constructed using standard 
  1168. Workplace Shell behavior. Hold down Cntrl and Shift and drag the icon of 
  1169. another file in the library to a paragraph, point, or image object in the 
  1170. SpHyDir Workarea. If the link is made to a text object, the Hotword Selection 
  1171. window opens to select the particular phrase in the paragraph or point that 
  1172. will be used to form the link. 
  1173.  
  1174.  Links to remote documents should be managed with the aid of a Web Browser. In 
  1175. particular, in the OS/2 Warp environment in which SpHyDir operates the IBM Web 
  1176. Explorer program is an obvious choice. SpHyDir can extract the URL for 
  1177. frequenly used Web documents from the Web Explorer Hotlist, or an XSpO 
  1178. (external Rexx Program) can be used to extract from the active Web Explorer 
  1179. window the URL of the document currently being displayed. SpHyDir eliminates 
  1180. the opportunity for typing errors when entering the URL. 
  1181.  
  1182.  SpHyDir has a separate Link Manager Window that can be displayed by choosing 
  1183. it from the Window pulldown menu on the main SpHyDir workarea. 
  1184.  
  1185.  There is a button at the bottom of the window with the icon of the IBM Web 
  1186. Explorer. Click on this button and the list box fills with the current 
  1187. Quicklist from Web Explorer. 
  1188.  
  1189.  The top of the Link Manager window lists hyperlinks out of the currently 
  1190. selected document element in the main workarea window. In the workarea, 
  1191. hotwords are delimited by two special triangle characters. The Link Manager 
  1192. window shows the URL or file name of the links in the order that the hotwords 
  1193. appear in the paragraph or point. To delete a hotword link, select the URL in 
  1194. the Link Manager window list and press Ctrl-D. This will remove the triangle 
  1195. characters from the hotwords in the text. It is an error to delete the triangle 
  1196. characters in the text, because SpHyDir uses them to correlate hotwords to 
  1197. URLs. 
  1198.  
  1199.  
  1200. ΓòÉΓòÉΓòÉ 11. The Subdocument Tree ΓòÉΓòÉΓòÉ
  1201.  
  1202.  Most HTML editor tools operate on a single text file. However, good practice 
  1203. holds that hypertext documents should be divided into a large number of small 
  1204. files. Managing all these files and maintaining a consistent overall structure 
  1205. then becomes a serious problem. 
  1206.  
  1207.  
  1208. ΓòÉΓòÉΓòÉ 11.1. The Library ΓòÉΓòÉΓòÉ
  1209.  
  1210.  PC Lube and Tune has developed into a library structure that seems generally 
  1211. applicable. Because no one application can assume to own the entire server, the 
  1212. files fall under a common starting directory. During development, this is 
  1213. x:\PCLT on the author's machine. In distribution, the same structure becomes 
  1214. http://pclt.cis.yale.edu/pclt/ on the server. 
  1215.  
  1216.  SpHyDir gets the local library name from the HTMLLIB environment variable. In 
  1217. this case, "SET HTMLLIB=F:\PCLT" is put in CONFIG.SYS. All of the HTML and GIF 
  1218. files that SpHyDir processes have to fall on this disk under this directory. 
  1219. SpHyDir is then programmed to moderate between the native OS/2 file naming 
  1220. conventions (with "\") and the more general file naming conventions used in 
  1221. most hypertext links (with "/"). In concept, it should be possible to move the 
  1222. entire structure from OS/2 to a Unix server. 
  1223.  
  1224.  Although it is possible to dump all the files in one directory, the library 
  1225. becomes more managable if each major subject has its own directory. Any large 
  1226. collection of related files can be collected in the same subdirectory. 
  1227.  
  1228.  
  1229. ΓòÉΓòÉΓòÉ 11.2. Chapter and Verse ΓòÉΓòÉΓòÉ
  1230.  
  1231.  It is possible for a collection of random short documents to be collected 
  1232. together in some free-form association. No structure would be needed for such a 
  1233. grouping. However, most collections of hypertext files actually started as a 
  1234. larger paper document. The material was broken into smaller files because it is 
  1235. best if each file on the Web is only a few screens long. However, the original 
  1236. logical structure of chapters, sections, and subsections is still logically 
  1237. present. 
  1238.  
  1239.  To accomodate this, SpHyDir supports the concept of a Subdocument. A 
  1240. Subdocument is a special kind of "paragraph" object in a file. Any word in an 
  1241. ordinary paragraph or point can be a hypertext link to another file. However, 
  1242. such links do not establish a relationship between the file containing the link 
  1243. and the file to which the link points. 
  1244.  
  1245.  A Subdocument link, however, claims that the other file is logically a part of 
  1246. the file that references it. When one file claims another as a Subdocument, 
  1247. then the first file is said to be the "parent" of the claimed file. A thousand 
  1248. different files can have ordinary hypertext links to the same Web page, but 
  1249. only one file can claim to be its parent. (This is a restriction that the user 
  1250. should obey. SpHyDir is not currently in a position to enforce it). 
  1251.  
  1252.  Just as each library generally has a "front door" or "home page", so any 
  1253. collection of subdocument has a starting point. The "root" document is the one 
  1254. member of the group that has no parent. It points to subdocuments, and they in 
  1255. turn can point to other subdocuments. 
  1256.  
  1257.  
  1258. ΓòÉΓòÉΓòÉ 11.3. Objects and Attributes ΓòÉΓòÉΓòÉ
  1259.  
  1260.  Physically, a Subdocument Object produces a paragraph whose only content is 
  1261. the TITLE of the Subdocument. This TITLE is a hypertext link to the 
  1262. Subdocument. In addtion, however, the Subdocument object has a structural 
  1263. effect upon the parent, the named document, and other subdocuments that are 
  1264. also claimed by the same parent. 
  1265.  
  1266.  Subdocuments are normally a series of chapters or sections. If the text were 
  1267. printed out, they would be printed and read in order. The order in which the 
  1268. Subdocument objects appear in the parent produces a Next/Previous relationship 
  1269. between the subdocuments themselves. HTML 2.0 doesn't have a formal method of 
  1270. expressing this relationship. HTML 3.0 will have syntax for Next and Previous 
  1271. links. Until this becomes widely available, SpHyDir manages the relationships 
  1272. itself. 
  1273.  
  1274.  In OS/2 a file can have Extended Attributes. The normal attributes are things 
  1275. like Date and Size. Extended Attributes are maintained by the application that 
  1276. creates the file. SpHyDir creates Extended Attributes for the HTML files to 
  1277. manage the larger logical document structure within the subdocument tree. 
  1278.  
  1279.  One EA provides quick external access to the document TITLE without having to 
  1280. read through the HTML. Another lists all the Subdocuments that the current 
  1281. document claims. Another lists the parent, if any, of the current document. 
  1282. Another lists all the Header text and levels of all the Sections contained 
  1283. within the document. 
  1284.  
  1285.  To create a Subdocument link, first drag the "Book" tool (the first one in the 
  1286. Toolbar) and drop it anywhere a paragraph or list point can go. The definition 
  1287. is completed by dragging the Workplace icon of another HTML file from the 
  1288. library and dropping it on the newly created object. If the dragged file was 
  1289. previously generated by SpHyDir, then when it is dropped on the Subdocument 
  1290. object, SpHyDir will extract is TITLE (from the EA) and display it as the 
  1291. caption of the object. This title will appear in the final page on a line by 
  1292. itself hypertext linked to the referenced file. 
  1293.  
  1294.  When HTML is generated for the current file, the list of Subdocument objects 
  1295. in the order that they appear will be stored as an Extended Attribute of the 
  1296. current file, and an Extended Attribute will be created on each of the 
  1297. referenced files pointing back to the current file as the parent. 
  1298.  
  1299.  Subdocument objects are not a formal construct of HTML 2.0, but there is some 
  1300. fully documented syntax that comes very close. When the Subdocument object is 
  1301. converted to HTML, it is generated in one of two forms (a paragraph or a list 
  1302. item): 
  1303. <P><A HREF="xxx.htm" REL="Subdocument"> ...title...</A></P> 
  1304. or 
  1305. <LI><A HREF="xxx.htm" REL="Subdocument"> ...title...</A> 
  1306. If SpHyDir processes an existing HTML document with the REL="Subdocument" 
  1307. attribute it will try to convert it back to a subdocument object. 
  1308.  
  1309.  
  1310. ΓòÉΓòÉΓòÉ 11.4. Next and Previous ΓòÉΓòÉΓòÉ
  1311.  
  1312.  HEADER and TRAILER can contain variables which are replaced with current 
  1313. information. Variable names are enclosed in "[" and "]" characters. 
  1314. [Date] is replaced by the current date. 
  1315. [Doctitle] is replaced by the TITLE of the document. 
  1316. [Up] is replaced by the file that claims this as a subdocument. 
  1317. [Previous] and [Next] are replaced by the files that appear before and after 
  1318. this file in the Subdocument list of the Parent. 
  1319.  
  1320.  The [Up], [Next], and [Prevous] relationships don't always exist. For example, 
  1321. the document at the top of the tree has no Up. The first document listed as a 
  1322. Subdocument has no Previous, and the last document has no Next. To accomodate 
  1323. this, any line in HEADER or TRAILER that references a non-existant variable is 
  1324. entirely deleted. The idea is that you put on one line all the stuff that would 
  1325. relate to a relationship, and when it doesn't exist then the entire package is 
  1326. deleted. 
  1327.  
  1328.  An example HEADER might include the lines: 
  1329. <P> 
  1330. [<A HREF="[Up]">Up</A>] 
  1331. [<A HREF="[Previous]">Previous</A>] 
  1332. [<A HREF="[Next]">Next</A>] 
  1333. </P> 
  1334. <P><I> [Date] </I></P> 
  1335.  
  1336.  Every document gets a line containing the current date in italics. Above that 
  1337. line there may be 0-3 hyperlinks depending on the number of available 
  1338. relationships. If all three links are generated, then the line looks like: 
  1339. [Up] [Previous] [Next] 
  1340. with each word acting as a link. 
  1341.  
  1342.  
  1343. ΓòÉΓòÉΓòÉ 11.5. The Document Tree Window ΓòÉΓòÉΓòÉ
  1344.  
  1345.  The Window pulldown menu of the SpHyDir Workarea includes an option to display 
  1346. the Document Tree for whatever HTML file is currently in the Workarea. 
  1347.  
  1348.  To build this window, SpHyDir checks for the Parent of the current file, and 
  1349. then for the parent of the parent, until it finally reaches the Root document. 
  1350. It then proceeds down through the Extended Attributes of the Root and all the 
  1351. subdocuments and sub-subdocuments. For each file, the TOC Extended Attribute 
  1352. lists all of the Headers in that file. 
  1353.  
  1354.  The Document Tree window displays a complete cumulative Table of Contents for 
  1355. all of the files in the document tree structure. It is intended to eventually 
  1356. create a TOC file and simplify the creation of references from one part of the 
  1357. tree to a section in another file. 
  1358.  
  1359.  Currently, the major feature of this window is the ability, from the File 
  1360. pulldown menu, to trigger SpHyDir to regenerate HTML for all of the files in 
  1361. the tree. This is a convenient way to clean things up if the HEADER or TRAILER 
  1362. files have been changed or when the logical order of files has been rearranged. 
  1363.  
  1364.  
  1365. ΓòÉΓòÉΓòÉ 12. XSpO - External SpHyDir Rexx Code ΓòÉΓòÉΓòÉ
  1366.  
  1367.  It is nice to have code that understands Web Explorer, but other people use 
  1368. Netscape, Mosaic, or other browsers. SpHyDir can't handle every type of hotlist 
  1369. file. The solution to this and other problems is an External SpHyDir Object. 
  1370. These are called XSpO's (pronounced "expo") but given that they are written in 
  1371. Rexx, it is acceptable to roll an "R" in front of the name and call it a 
  1372. "Rexx-spo". 
  1373.  
  1374.  An XSpO is an external Rexx program that resides as a CMD file on disk. If you 
  1375. click on the file with the second mouse button, open its Settings, and change 
  1376. the icon, you can give it some meaninful icon. Then you put a shadow of the 
  1377. file in a desktop folder, probably along with your program object for SpHyDir. 
  1378.  
  1379.  An XSpO acts something like a Tool. You drag it from its workplace folder and 
  1380. drop it somewhere in the SpHyDir program. The nature of the XSpO decides where 
  1381. it can be dropped. Unlike the Tools, an XSpO could be dropped on an entry area 
  1382. or list. 
  1383.  
  1384.  The XSpO interface will be extended whenever an idea comes to mind. Currently, 
  1385. the two supported uses of an XSpO are to fill the New Links list box in the 
  1386. Link Manager window and to add a URL Link to an object in the work area. Sample 
  1387. XSpO files are supplied with SpHyDir for both purposes and will be discussed 
  1388. here. 
  1389.  
  1390.  SpHyDir assumes that it has an XSpO whenever the user drops a CMD file on an 
  1391. object. When the object accepts XSpO, it generates a Rexx Call to the file as 
  1392. an external procedure. Since the caller is running in the VX-Rexx environment, 
  1393. all of the VX-Rexx functions are available to the XSpO. However, it will be 
  1394. difficult to make use of them without 1) a copy of the VX-Rexx manual and 2) 
  1395. some hints from me about the environment. An XSpO that uses VX-Rexx function 
  1396. calls to manipulate objects is said to be "dirty." The internal implimentation 
  1397. of SpHyDir may change in the future, and such files may need to be changed. An 
  1398. object that supports XSpO will generally provide a convention using only 
  1399. arguments, the return value, and the stack. Details may differ from object to 
  1400. object. An XSpO that does not directly call VX-Rexx functions is said to be 
  1401. "clean." The terms are relative, and it may be convenient to use "quick and 
  1402. dirty" techniques from time to time. 
  1403.  
  1404.  When an XSpO is called, it is always passed as an argument the name of the 
  1405. object on which it was dropped. There is no good way (currently) for XSpO's to 
  1406. declare a type, so the XSpO itself has to make sure it has been dropped in the 
  1407. right place and return without doing anything if it is called by the wrong 
  1408. object. Objects that call XSpO's should ignore any null return. 
  1409.  
  1410.  When an XSpO is dropped on the New Links listbox of the Link Manager window, 
  1411. it is passed no arguments other than the "New_Links" object name. The XSpO puts 
  1412. new list entries on the Rexx stack. Each entry begins with a URL (no blanks are 
  1413. allowed by SpHyDir in a URL) and then a Title (blanks are OK in the tile). Each 
  1414. line in the Rexx queue is one list entry. Only the title will show up in the 
  1415. list box, the URL is kept as user data and is presented later on when the title 
  1416. is dragged to create a link. If the XSpO returns the word "CLEAR" from the 
  1417. function call, then the list box is cleared and the new list becomes its only 
  1418. contents. Otherwise, the new links are added in front of the existing links. 
  1419.  
  1420.  The following is the complete text of an XSpO that duplicates the existing Web 
  1421. Explorer Link Manager function. This file is distributed with SpHyDir and may 
  1422. be adapted to support other quicklist formats. 
  1423.  
  1424. /* XSpO version of Web Explorer Links */
  1425. arg object
  1426. if object<>"NEW_LINKS" then return
  1427.  
  1428. exploreini=Value("ETC",,"OS2ENVIRONMENT")"\EXPLORE.INI"
  1429. strm_status = Stream( exploreini, "Command", "Open Read" )
  1430. if strm_status="READY:" then
  1431.   do while lines(exploreini)>0
  1432.   line=linein(exploreini)
  1433.   if line="[quicklist]" then leave
  1434.   end
  1435.   do while lines(exploreini)>0
  1436.   line=linein(exploreini)
  1437.   parse var line "quicklist=" title
  1438.   if title="" then return
  1439.   url=linein(exploreini)
  1440.   queue url title
  1441.   end
  1442. return "CLEAR"
  1443.  
  1444.  The Workarea also supports XSpO's, but the only function currently supported 
  1445. is to add a Link to an object. Dropping this type of XSpO on a Workarea object 
  1446. is simpler than adding the link to the Link Manager list and then dragging the 
  1447. list item over and dropping it on the object. A supplied XSpO uses some rather 
  1448. "dirty" logic to find the current URL in Web Explorer (you have to enable the 
  1449. WE option that displays the URL in a box at the top of the window). Dropping 
  1450. this XSpO on a paragraph, point, or image puts a link to whatever page is 
  1451. currently being displayed in WE (without requiring that the page be added to 
  1452. the Quicklist). 
  1453.  
  1454. arg object
  1455.   if wordpos(object, "NEW_LINKS WORKAREA")=0 then return
  1456.  
  1457.   desktop = "?HWND1"
  1458.   app = VRGet( desktop, "FirstChild" )
  1459.     do while app<>""
  1460.     title=VRGet(app,"Caption")
  1461.     if substr(title,1,16 )="IBM WebExplorer " then
  1462.       do
  1463.       title=strip(substr(title,19),"B")
  1464.       kid= VRGet(app,"FirstChild")
  1465.       url=Searcher(kid)
  1466.       if url<>"" then queue url title
  1467.      if object="WORKAREA" then return "LINK"
  1468.       return "ADD"
  1469.       end
  1470.     app = VRGet( app, "Sibling" )
  1471.     end
  1472. return ""
  1473.  
  1474. Searcher: procedure
  1475.   parse arg w
  1476.   do while w <> ""
  1477.     if VRGet( w, "Visible" ) = 1 then do
  1478.       class = VRGet( w, "ClassName" )
  1479.       caption = VRGet( w, "Caption" )
  1480.       if class="WC_ENTRYFIELD" then return caption
  1481.       subkid = VRGet( w, "FirstChild" )
  1482.       url= searcher(subkid)
  1483.       if url<>"" then return url
  1484.       end
  1485.     w = VRGet( w, "Sibling" )
  1486.   end
  1487.  
  1488. return ""
  1489.  
  1490.  
  1491. ΓòÉΓòÉΓòÉ 13. Forms Support ΓòÉΓòÉΓòÉ
  1492.  
  1493.  Modern HTML and Web Browser programs allow the user to enter data and make 
  1494. selections with standard GUI Boxes, Buttons, and Lists. Collectively, these 
  1495. features are know as "forms" support. There are two steps. First, the author 
  1496. must design the data entry form using HTML language elements. Secondly, a 
  1497. program must be written in some supported language to process the data that the 
  1498. user enters. 
  1499.  
  1500.  HTML forms provide a subset of the standard GUI dialog features that will be 
  1501. familiar to users of Visual Basic or other visual programming languages. The 
  1502. user is presented with a set of single line and multiline text entry fields, 
  1503. checkboxes, radio buttons, selection lists, and push buttons. The user makes 
  1504. selections and enters data. Then a push button (or the Enter key) transmits 
  1505. data to the server. 
  1506.  
  1507.  
  1508. ΓòÉΓòÉΓòÉ 13.1. Forms Handling Programs ΓòÉΓòÉΓòÉ
  1509.  
  1510.  The data entered in a form has to be passed to locally written code that runs 
  1511. on the Web server machine. For a Unix machine, this program receives data 
  1512. through the "CGI" protocol. CGI specifies a particular way to pass information 
  1513. about the request, the remote machine, and the local server environment. Most 
  1514. CGI programs are written in either C or Perl. 
  1515.  
  1516.  However, SpHyDir runs in OS/2 and is written in Rexx. IBM has a very nice Web 
  1517. server package for this environment called GOSERVE. Each arriving request is 
  1518. passed to a locally customized Rexx filter program running as a subthread of 
  1519. the server. Whatever efficiency is lost using an interpreted language like Rexx 
  1520. is gained back by using threads instead of creating a new process for each 
  1521. request.  Although GOSERVE provides all the necessary forms support, it doesn't 
  1522. use precisely the same conventions as the CGI interface.  SpHyDir will talk 
  1523. more generically about a "forms processing program" while other sources would 
  1524. probably call the same thing a "CGI program" without assuming that there could 
  1525. be any other kind of server. 
  1526.  
  1527.  Each GUI object in the HTML form is associated with a variable name. The data 
  1528. and selections are transmitted as a sequence of "name = value" pairs, where 
  1529. name is the variable name associated with a field or button and value is the 
  1530. data typed or the alternative selected. This sequence of name and value pair 
  1531. must be processed by program that processes the request. 
  1532.  
  1533.  After the request is processed, the results are sent back to the remote user. 
  1534. Normally, the format of this result is another HTML file. Frequently, the 
  1535. response will also have Forms objects. The contents of the response file will 
  1536. include some insertions based on the results of the previous request. 
  1537.  
  1538.  Thus a comprehensive tool to simplify Form processing has to solve three 
  1539. problems: 
  1540.  
  1541.    1. It must provide the user with an easy way to specify the GUI objects 
  1542.       (entry fields, buttons, check boxes, and selection lists). SpHyDir does 
  1543.       this by providing Toolbar of GUI objects just as Visual Basic and VX-Rexx 
  1544.       solve the same problem with similar toolbars. 
  1545.  
  1546.    2. It must provide a simple way to decode the incoming "variable=value" 
  1547.       pairs. The Rexx language (along with some helper functions provided by 
  1548.       GOSERVE) makes this a trivial task, but it is not a very difficult 
  1549.       problem in any language.  SpHyDir provides a Rexx "helper" routine named 
  1550.       SpHyDir_Decode in the SPHYHLPR.VRS file that provides this service. 
  1551.  
  1552.    3. It must provide a way to insert data into the reply sent back to the 
  1553.       user. 
  1554.  
  1555.        Some existing programs generate the entire response with program 
  1556.       statements: 
  1557.       SAMPprintf("<TITLE>Response to Your Request</TITLE>\n");/SAMP 
  1558.       This is tedious, difficult to read, and impossible to validate. 
  1559.  
  1560.        A second approach scans an HTML file and inserts data: 
  1561.       SAMP<TITLE> 
  1562.       %insert TITLETEXT 
  1563.       </TITLE>/SAMP 
  1564.       This is slow because it requires a syntax scan during every reply. 
  1565.  
  1566.        SpHyDir provides (IMHO) a better solution.  The programmer uses SpHyDir 
  1567.       to create a ordinary HTML file with text and forms objects.  As SpHyDir 
  1568.       generates the HTML, it separately tabulates the location of strings or 
  1569.       insertion points that correspond to the various forms variable names.  If 
  1570.       the file is fetched as a *.HTM file, then everything goes out as it was 
  1571.       designed. However, if a forms processing program wants to send the file 
  1572.       back as a reply to a previous query, then it can call a helper routine 
  1573.       (SpHyDir_Reply in the supplied Rexx-GOSERVE example) that extracts from 
  1574.       the program the current value of all variables whose names correspond to 
  1575.       the variable names assigned to the forms objects in the HTML file.  These 
  1576.       current values from the program are inserted into the file as it is sent 
  1577.       back to the user and populate the fields, boxes, buttons, and lists that 
  1578.       are available for the next reply. 
  1579.  
  1580.   Rexx is a particularly attractive language in which to do this kind of 
  1581.  programming because access to its variable names and symbol table is simple 
  1582.  and flexible. The combination of SpHyDir, Web Explorer, GOSERVE, and 
  1583.  Rexx-based Forms processing programs provides a simple but powerful Web 
  1584.  development environment. However, local requirements will soon make it 
  1585.  necessary to extend this development environment to real CGI programs running 
  1586.  on Windows NT or Unix servers. 
  1587.  
  1588.  
  1589. ΓòÉΓòÉΓòÉ 13.2. Forms are poorly Form-matted ΓòÉΓòÉΓòÉ
  1590.  
  1591.  The ambiguities of HTML that cause problems for SpHyDir in normal text are 
  1592. made worse when Forms are processed. Consider a simple example: 
  1593.  
  1594.  The top line is a simple entry area for typed characters. The second line 
  1595. presents three alternatives using the "radio button" metaphor (only one can be 
  1596. selected, and choosing one deselects the others). The last line is a check box 
  1597. that can be set or cleared by clicking it. 
  1598.  
  1599.  In visual programming languages, such as Visual Basic, each radio button or 
  1600. check box has a "caption" defining the text that follows the box or button and 
  1601. describes the option. In this example, the captions are "HTTP", "Gopher", 
  1602. "FTP", and "BINARY". Occasionally, but less frequently, a Text Entry object 
  1603. would also have a caption (in this case "Identify a Server Machine:"). In any 
  1604. case, the Caption is an attribute of the object and is part of the object 
  1605. definition. 
  1606.  
  1607.  However, in HTML a box or button object is just the box or button itself. Any 
  1608. caption text is just ordinary "paragraph" text. There is no limit on its size, 
  1609. contents, or structure. Just as SpHyDir had to invent a chapter and section 
  1610. structure by looking at Heading tags, it must also construct GUI programming 
  1611. objects by assuming that the captions are reasonable and obvious. 
  1612.  
  1613.  All GUI objects (entry areas, buttons, boxes, and selection lists) must be 
  1614. inside a FORM area. However, the form can also contain ordinary text, images, 
  1615. ordered and unordered lists, sections, and everything else that is valid in a 
  1616. document. Unlike a paper form, where the instructions are usually separate so 
  1617. that the input can be easily processed, an HTML form can have the input widely 
  1618. scattered through the text. When the form is submitted, only the values of the 
  1619. entry fields and the selections made by the user are transmitted, not the 
  1620. captions and text. 
  1621.  
  1622.  A user will become confused, however, if each Radio Button option is 
  1623. accompanied with three screens full of explanation. The relationship between 
  1624. the buttons would be lost. Therefore, it is probably best if each field or 
  1625. button has a short clean caption. Furthermore, based on a universal GUI 
  1626. practice, the caption of a data entry area would ususally come in front of the 
  1627. entry field (as the example "Identify a Server Machine:"), while the label of a 
  1628. check box or radio button comes right after it. 
  1629.  
  1630.  In normal text, most of the SpHyDir objects start a new line. This is not true 
  1631. of Form Objects. If a browser can fit the next button on the same line, it will 
  1632. do so. The only way to be sure that there is a line break is to create a 
  1633. paragraph (<P>) tag. 
  1634.  
  1635.  In normal text, every SpHyDir object is "paragraph sized" or larger. SpHyDir 
  1636. knows to create a line break when paragraphs, ordered lists, and headers are 
  1637. encountered. But several forms objects may have to go on the same line. One 
  1638. idea would be to create a higher "grouping" object to which they might all 
  1639. belong, but SpHyDir is based on the principle that format should follow from 
  1640. document structure, and it seems wrong to create artificial structure to 
  1641. duplicate a format feature. 
  1642.  
  1643.  It has always been possible to create an empty paragraph. Simply drag the 
  1644. Paragraph tool to the document to create a new paragraph, then type nothing in 
  1645. it. When the HTML is generated, this creates a line of the form: 
  1646. <P> </P> 
  1647. in the output. The problem is that SpHyDir ignores empty paragraphs when 
  1648. reading in normal text, so this structural element is lost when the document is 
  1649. re-edited. SpHyDir relaxes this rule, and will preserve empty paragraphs when 
  1650. they are encountered inside a Form structure. A form designer should drop an 
  1651. empty paragraph object between any two buttons, fields, or boxes that are 
  1652. supposed to appear on different lines. 
  1653.  
  1654.  
  1655. ΓòÉΓòÉΓòÉ 13.3. Form Tools ΓòÉΓòÉΓòÉ
  1656.  
  1657.  The Toolbar contains template objects for all the GUI elements that HTML 
  1658. supports. If this document is viewed using a Web Browser, examples of the Forms 
  1659. objects will appear in the document. They are not connected to any processing 
  1660. program at this time. Attempting to submit anything from these form objects 
  1661. will return an error message. Just go back to the document and continue. Forms 
  1662. examples will not appear in the INF version of this material, because forms are 
  1663. not supported in IPF. 
  1664.  
  1665.  
  1666. ΓòÉΓòÉΓòÉ 13.3.1. The Forms Tool ΓòÉΓòÉΓòÉ
  1667.  
  1668.  Interactive form elements are valid only within a section of a document maked 
  1669. as a Form. The Form Tool creates such a section. Drag the Form Tool over and 
  1670. drop it anywhere in a document except within another Form. This creates a new 
  1671. level in the document tree. All other form objects, and all ordinary document 
  1672. objects, are valid within a Form section. 
  1673.  
  1674.  Each form must be associated with the name of a program that the server will 
  1675. run to process the data from the form. When the form object is created or 
  1676. selected, an entry area becomes visible into which a program identifier can be 
  1677. typed. The exact format for program identifiers depends on the type of server 
  1678. being used. On a Unix server, this is usually the name of a program in the 
  1679. "cgi-bin" subdirectory, as in "/cgi-bin/program". On other systems, this may be 
  1680. any program name. 
  1681.  
  1682.  
  1683. ΓòÉΓòÉΓòÉ 13.3.2. The Single Line Text Entry Field ΓòÉΓòÉΓòÉ
  1684.  
  1685.  The Entry Field Tool creates a "single line" text entry area. This is the type 
  1686. of field that would be used to read simple data like a name, phone number, 
  1687. E-Mail address, or book title. 
  1688.  
  1689.  The caption for the Entry Field Object is treated like paragraph text. When 
  1690. the field is created, or when the object is double-clicked, the standard Text 
  1691. Edit window opens. Although the user can type an arbitrary amount of text into 
  1692. the window, the caption should generally be short. When the object is closed, 
  1693. it is the caption and not the default field contents that appears next to the 
  1694. Entry Field Object in the SpHyDir Workarea. 
  1695.  
  1696.  An Entry Field object has attributes. When the object is created or is 
  1697. selected by clicking with the first mouse button, a set of fields becomes 
  1698. visible in the upper right section of the Workarea. Yes, these are also "entry 
  1699. fields", but they are part of the VX-Rexx application and not the HTML Forms. 
  1700. Many of these attributes are common or similar across all the Forms objects. 
  1701. For each type of object, the appropriate set of fields becomes visible. 
  1702.  
  1703.  The first (top) attribute is a variable name. When the form is submitted, the 
  1704. text entered into the field will be transmitted as the value of a "name=value" 
  1705. sequence. For example, entering "Yale University" into a field with this 
  1706. definition would transmit the sequence: 
  1707. SAMPsampentry=Yale University/SAMP 
  1708. to the Web Server. This value, along with any other values from other fields in 
  1709. the form, will be passed to the program designated by the FORM object to handle 
  1710. the data. 
  1711.  
  1712.  In many cases, the Text Entry field will be initially empty and the user will 
  1713. be expected to type a value in. HTML allows an initial value to be transmitted 
  1714. from the server. This string will appear in the Text Entry field and will be 
  1715. transmitted back as its value if the user doesn't change it. A static default 
  1716. value can be entered in the second (long middle) field. 
  1717.  
  1718.  A default value can also be generated dynamically from a previous Web Server 
  1719. program that requested transmission of the current page. To allow this, SpHyDir 
  1720. creates a "symbol table" external but connected to the HTML source for the 
  1721. page. This table is attached as an Extended Attribute of the file in the OS/2 
  1722. or NT file system, and is stored less elegantly as a separate file in Unix. For 
  1723. this field, the table would contain a line of the form: 
  1724. ENTRY SAMPENTRY nnnn 18 
  1725. Where "ENTRY" is the type of forms object, "SAMPENTRY" is the name of the 
  1726. variable associated with the field, "nnnn" will be replaced with the byte 
  1727. offset in the field of the default value (in this example, the offset of the 
  1728. "S" in "Sample Entry Field"), and 18 is the length of the static default value. 
  1729.  
  1730.  An Entry field generates HTML text of the form: 
  1731. <INPUT TYPE="TEXT" NAME="SAMPENTRY" VALUE="Sample Entry Field" SIZE="30" 
  1732. MAXLENGTH="30"> 
  1733. If no static default text is provided, a VALUE="" is generated to simplify the 
  1734. insertion of a dynamic default text from the symbol table. SpHyDir helper 
  1735. routines simplify the insertion of dynamic default text from forms processing 
  1736. programs. 
  1737.  
  1738.  The last attributes of an Entry Field include a checkbox to declare that this 
  1739. is a Password field (so the data typed in should be masked out) and two length 
  1740. fields. The first length specifies the size of the box, the second field is the 
  1741. maximum amount of data that can be typed into the box. If the maximum amount is 
  1742. larger than the size of the box, or is omitted all together, then when the user 
  1743. gets to the end of the box the previous characters shift left to make room. 
  1744.  
  1745.  
  1746. ΓòÉΓòÉΓòÉ 13.3.3. The Multiline Entry Field ΓòÉΓòÉΓòÉ
  1747.  
  1748.  A Multiline Entry (MLE) Object generates an area with scroll bars into which 
  1749. the user can type an arbitrary amount of text. This is ususally used for 
  1750. freeform feedback (to send comments, suggestions, or complaints to the author). 
  1751. It can also be used to annotate information. 
  1752.  
  1753.  An MLE is a large object, so it has no formal caption. If you want to describe 
  1754. it, do so in the paragraph that preceeds or follows it. The contents of the MLE 
  1755. object, which can be edited by double clicking the object and opening the Text 
  1756. Edit window, is the static data that will appear as a default within the MLE 
  1757. window when it is displayed on the remote screen. 
  1758.  
  1759.  An MLE field in a Web Browser will not support font changes or hypertext 
  1760. links. SpHyDir may eventually get around to disabling these options in the Text 
  1761. Edit window. Meanwhile, when editing default text for an MLE, don't use 
  1762. italics, bold, or any of the other format tags. 
  1763.  
  1764.  An MLE is associated with a variable name. When the form is submitted, the new 
  1765. content of the MLE will be assigned as a value to that variable name. SpHyDir 
  1766. creates a entry in the Variables Extended Attribute with the type of "MLE", the 
  1767. name of the variable, the location of the start of the default text, and the 
  1768. length of the static default text. This can be used by the helper routine to 
  1769. insert an alternate string dynamically into the form as it is being 
  1770. transmitted. The content of such a string would be whatever HTML declares to be 
  1771. valid between the <TEXTAREA> and </TEXTAREA> tags. 
  1772.  
  1773.  An MLE also has a size specified as rows and columns. They appear in the two 
  1774. lower numeric boxes and can be changed to fit the application needs. 
  1775.  
  1776.  
  1777. ΓòÉΓòÉΓòÉ 13.3.4. The Checkbox Tool ΓòÉΓòÉΓòÉ
  1778.  
  1779.  The Checkbox Tool creates a standard GUI Checkbox object. A caption follows 
  1780. the Checkbox to describe the option. The caption is regarded as the "contents" 
  1781. of the object and may be edited by double-clicking the checkbox object to open 
  1782. the Text Edit window. Unlike the MLE, the checkbox caption is ordinary text and 
  1783. may contain emphasis (bold, italics) or hypertext links. 
  1784.  
  1785.  The Checkbox is associated with a variable name. When the checkbox is seleted, 
  1786. a "name=ON" pair is returned. A static default value can be set by clicking the 
  1787. "Checked" option when the checkbox object is currently selected. 
  1788.  
  1789.  A Checkbox has a variable name. It can also be statically assigned an initial 
  1790. value by checking the "Checked" checkbox for the Checkbox object. [This is 
  1791. about the fourth pass through this document, and it just gets worse as it gets 
  1792. more precise.] 
  1793.  
  1794.  There are different ways to express the value of a Checkbox variable. As a 
  1795. number it would be 0 or 1. In other contexts it might be "YES" and "NO" or 
  1796. "TRUE" and "FALSE". In HTML, the checkbox is turned on by adding the keyword 
  1797. "CHECKED" to the tag that defines it: 
  1798. SAMP<INPUT TYPE="CHECKBOX" NAME="NOMAYO" CHECKED>/SAMP 
  1799. However, when the user submits the form and the box is checked, the variable 
  1800. name is returned with the value "ON" as in: 
  1801. SAMPNOMAYO=ON/SAMP 
  1802. Clearly this is a muddy area and may be subject to further refinement. 
  1803.  
  1804.  When SpHyDir generates the Variables EA for this field, the entry will have 
  1805. the form: 
  1806. CHECKBOX NOMAYO nnnn 7 
  1807. Where the type is CHECKBOX, the variable name is NOMAYO, nnnn is the byte 
  1808. offset in the file of the blank following the variable name, and the length is 
  1809. either 0 or 7 since the word "CHECKED" has seven letters and is either present 
  1810. or omitted. 
  1811.  
  1812.  
  1813. ΓòÉΓòÉΓòÉ 13.3.5. The Radio Button Tool ΓòÉΓòÉΓòÉ
  1814.  
  1815.  The RadioButton Tool is used to specifiy one of a set of mutually exclusive 
  1816. alternatives. Only one can be selected, and selecting that option automatically 
  1817. turns off the other alternatives. 
  1818.  
  1819.  The Web server is: 
  1820.  
  1821.  The caption of the RadioButton, which can be edited by doubleclicking the 
  1822. object to open the Text Edit Window, is ordinary text and may have emphasis and 
  1823. hyperlinks. However, if the captions are large enough so that the alternatives 
  1824. cannot all fit on the same line, the user must provide additional HTML markup 
  1825. (such as the <HR> tag) to group related buttons together. 
  1826.  
  1827.  When a RadioButton Object is created or selected, three fields become visible 
  1828. at the top of the Workarea. The first field provides the variable name for this 
  1829. button (and implicitly all other buttons that are part of the same grouping). 
  1830. The second field contains a string that will be assigned to the variable when 
  1831. this particular button is selected. Under these fields, a Checkbox allows this 
  1832. particular button to be selected as the default for the group. To be 
  1833. meaningful, only one button in each group can be checked as the default. 
  1834.  
  1835.  In Visual Basic and VX-Rexx, radio buttons have to be collected in a Group Box 
  1836. to be related to each other. In HTML forms, radio buttons are related by having 
  1837. the same variable name. The value assigned to that variable name distinguishes 
  1838. one button from another. 
  1839.  
  1840.  Radio Buttons pose a problem for the symbol table in the Extended Attribute. 
  1841. Up to this point, every HTML object produced one entry with its own variable 
  1842. name, and there was one insertion point for the value of that variable. 
  1843. However, each Radio Button has a tag location, and to override a static default 
  1844. with dynamic information from a program, the "CHECKED" attribute in all of the 
  1845. tags has to be manipulated. So for every radio button, the Variables EA gets a 
  1846. separate entry: 
  1847. SAMPRADIOBUT SERVER=UNIX nnnn 0 
  1848. RADIOBUT SERVER=OS2 nnnn 0 
  1849. RADIOBUT SERVER=NT nnnn 0/SAMP 
  1850. The "nnnn" in each line is the offset in the file of the blank that follows the 
  1851. name and either preceeds ">" (if the length is 0) or "CHECKED>" (if the length 
  1852. is 7). An acceptable strategy is to process these entries in order, checking 
  1853. the current value of the program's "SERVER" variable against the possible 
  1854. matching strings "UNIX", "OS2", and "NT". If a match is made, then "CHECKED" is 
  1855. inserted into the HTML file, if not and the length is 7 then the old "CHECKED" 
  1856. string is removed. 
  1857.  
  1858.  
  1859. ΓòÉΓòÉΓòÉ 13.3.6. The Spin and Listbox Objects ΓòÉΓòÉΓòÉ
  1860.  
  1861.  A Spin field displays a sequence of alternatives within a single window. CUA 
  1862. rules suggest that the Spin choice is appropriate when the alternatives are 
  1863. ordered, but the Spin object also allows a small number of alternatives to be 
  1864. meaningfully displayed in a small space. In HTML terms, a Spin object 
  1865. corresponds to a SELECT tag with no SIZE parameter. 
  1866.  
  1867.  Get a dozen eggs: 
  1868.  
  1869.  An interesting feature here is that Web Explorer seems to mess up the order 
  1870. and selection rules. It defaults to the last alternative chosen, when the 
  1871. standard clearly says that the first is the default, and it seems to get 
  1872. "bigger" and "smaller" reversed. 
  1873.  
  1874.  A Listbox provides another way to display alternatives. It is probably more 
  1875. suitable if the number of options is large. This Object is also a SELECT list, 
  1876. but with the SIZE parameter specified. 
  1877.  
  1878.  For both selection objects, a static list of alternatives can be entered 
  1879. through the Text Edit window by doubleclicking the object. Each alternative is 
  1880. typed on a separate line. Press Enter between alternatives. Do not use 
  1881. character emphasis or try to assign links to the alternatives. 
  1882.  
  1883.  List alternatives can be assigned dynamically by creating an array of 
  1884. character strings. For example, in Rexx a set of alternatives might be 
  1885. specified by the sequence: 
  1886. account.0=3 
  1887. account.1="Checking" 
  1888. account.2="Savings" 
  1889. account.3="Money Market" 
  1890. If the user chose the second option, this would then feed back as the string 
  1891. "account=Savings" which the Rexx helper routines would use to assign the string 
  1892. "Savings" to the variable ACCOUNT in the next program. [A note to those who are 
  1893. not Rexx wizards, the scalar variable ACCOUNT is completely independent of the 
  1894. "stem" ACCOUNT. (with the trailing period). This strategy uses the stem to hold 
  1895. the list of alternatives, and uses the scalar to designate which alternative 
  1896. was selected.] 
  1897.  
  1898.  
  1899. ΓòÉΓòÉΓòÉ 13.3.7. Pushbuttons ΓòÉΓòÉΓòÉ
  1900.  
  1901.  After filling in the required fields, the user triggers an action on the 
  1902. server by pressing a Pushbutton. If no Pushbutton object appears in the form, 
  1903. pressing the Enter key may also transmit data. 
  1904.  
  1905.  A default Pushbutton with no options is labelled "SUBMIT". It will trigger 
  1906. transmission of the data, but will add nothing to the datastream itself. 
  1907. Multiple "SUBMIT" buttons would be indistinguishable from each other. 
  1908.  
  1909.  Each Pushbutton has attributes: 
  1910.  
  1911.  The left entry box is the name of a variable. The right box is both the value 
  1912. assigned to the variable when the button is pushed and also the label placed on 
  1913. the face of the button. 
  1914.  
  1915.  When an explicit variable name is assigned to a Pushbutton object, an entry is 
  1916. also made in the Variable Extended Attribute. It identifies a type of 
  1917. "PUSHBUT", the variable name, the offset of the static value string, and its 
  1918. length. If the helper functions are used, they will check for a variable of the 
  1919. same name in the calling program and will substitute its current value in the 
  1920. Pushbutton definition. This means that the caption of the Pushbutton can be 
  1921. dynamically changed by the calling program. 
  1922.  
  1923.  A special version of the Pushbutton control is established if the Hidden 
  1924. attribute is checked when the button object is selected. A Hidden field doesn't 
  1925. appear on the user's screen, but it is passed back as part of the data stream 
  1926. to the next program. This can be used to pass a handle, transaction ID, or 
  1927. other state information from one screen to the next. 
  1928.  
  1929.  
  1930. ΓòÉΓòÉΓòÉ 14. Bugs and Restrictions ΓòÉΓòÉΓòÉ
  1931.  
  1932.  SpHyDir currently ignores tags nested within a Heading and may lose characters 
  1933. after the start of such a tag. It is important for Headings to remain pretty 
  1934. much plain text so that they can appear reasonably in a Table of Contents. 
  1935. There is a move in HTML 3.0 to allow an IMG SRC to appear as part of the Hn tag 
  1936. instead of as part of its contents. This seems a more reasonable direction. 
  1937.  
  1938.  The current design may require you to perform several operations to completely 
  1939. initialize a new object. After dropping a SECTION from the toolbar, you should 
  1940. type in a Header. The Section itself is a SpHyDir concept, HTML only recognizes 
  1941. the Header text. If you type nothing, then SpHyDir might generate "<H2> </H2>" 
  1942. which makes little sense and might be invalid. But currently SpHyDir doesn't 
  1943. force you to actually type a header, and it may not go back later on and 
  1944. "sanity check" the document to detect errors before generating HTML. So be sure 
  1945. to finish what you start. This includes remembering to drag a GIF file over to 
  1946. associate something with every Image object you create. 
  1947.  
  1948.  VX-Rexx 2.1B has a bug when moving a tree of records in a container. Suppose, 
  1949. for example, you decide to move one section in front of another. You can click 
  1950. on the sections to collapse the tree so that just the two icons are showing. 
  1951. You can then drag the second icon in front of the first. However, when you 
  1952. re-expand the tree, you will see that elements two or three levels down in the 
  1953. tree have been incorrectly reorganized. For now, the safe way to move large 
  1954. sections of the document is to mark them with Alt-L and move them through the 
  1955. SpHyDir special "Clipboard" window. 
  1956.  
  1957.  You cannot drag the contents of the Web Explorer screen directly into the 
  1958. SpHyDir workarea. This is not a big problem, because SpHyDir requires that HTML 
  1959. files be inside the HTMLLIB anyway. So first drag the WE screen to one of the 
  1960. folders inside the library, then probably rename it to something useful, and 
  1961. then edit it with SpHyDir. 
  1962.  
  1963.  SpHyDir saves the position and size of its subwindows.  SpHyDir currently 
  1964. doesn't save font or color changes for windows, so it should not be 
  1965. reconfigured by dropping System Setup Palette objects. 
  1966.  
  1967.  Two types of object go in front of things: the Horizontal Rule (HR) and a 
  1968. Target. However, when you put either in front of a section, the tree structure 
  1969. shows the objects as if they were part of the previous section and not an 
  1970. introducer to the new section. That wan't intended, but it would be almost 
  1971. impossible to change. Treat it as a permanent feature. 
  1972.  
  1973.  
  1974. ΓòÉΓòÉΓòÉ 15. Supported and Unsupported HTML ΓòÉΓòÉΓòÉ
  1975.  
  1976.  SpHyDir explicitly supports the HTML, HEAD, and BODY document structure tags. 
  1977. SpHyDir reads, remembers, and recreates the TITLE. SpHyDir will generate LINK 
  1978. tags that reflect relationships between documents in the tree. Except for 
  1979. TITLE, all information in other HEAD tags (ISINDEX, NEXTID, LINK, BASE, META) 
  1980. would be lost. 
  1981.  
  1982.  SpHyDir supports H1...H6 when they are really used as the heading of a section 
  1983. and not just to get big characters. 
  1984.  
  1985.  SpHyDir will normally generate paragraphs within a formal pair of <P> and </P> 
  1986. tags. Since many existing documents do not contain ending </P> tags, SpHyDir 
  1987. does not expect or require them. 
  1988.  
  1989.  UL, OL, and DL lists are supported along with LI, DT, and DD elements. Nested 
  1990. lists are fine. It is not entirely clear just what other structural elements 
  1991. are reasonable inside lists. A lot of NCSA documents seem to mix in ordinary 
  1992. paragraphs along with the expected LI tags. Currently, SpHyDir lets you put 
  1993. lots of stuff in a list, but it will absolutely refuse to generate a document 
  1994. if it finds a Section nested inside any List alternative. 
  1995.  
  1996.  It is possible to have any number of hypertext links from a Paragraph, 
  1997. preformatted text, a list point (in an ordered or unorded list), or the body of 
  1998. a definition.  It is possible for the Definition Term (<DT>) to have one 
  1999. hypertext link linking the entire term to another location or document.  No 
  2000. hypertext link can be made from a section heading. 
  2001.  
  2002.  The Horizontal Rule <HR> tag is supported. There is no icon or tool for it. 
  2003. This is not because it is hard to come up with an icon for a horizontal line. 
  2004. About ten seconds with the icon editor will produce it. To add an HR tag to a 
  2005. document, select the object you want it to proceed in the workarea and press 
  2006. Alt-H. 
  2007.  
  2008.  The PRE tag is recognized. The WIDTH attribute is not scanned and will not be 
  2009. regenerated. Preformatted text is similar to ordinary paragraphs, except that 
  2010. line breaks and multiple embedded spaces are preserved. 
  2011.  
  2012.  Hypertext labels pose a problem for SpHyDir and for HTML and IPF. First, HTML 
  2013. is changing the syntax. The current approach <A NAME=xxx> assigns a label to a 
  2014. string. The HTML 3.0 standard changes NAME to ID and allows the "ID=name" 
  2015. attribute to occur inside the H1..H6 and P tags as well as in an A tag. IPF 
  2016. only allows headings to be the target of a jump, and in a HLP file the ID has 
  2017. to be a number (the Resource ID). SpHyDir has decided to split the difference. 
  2018. When a current HTML <A NAME=xxx> tag is encountered, it is used to construct a 
  2019. Target object. However, the Target is moved to the front of the current 
  2020. Paragraph or section. It is then generated as an <A NAME=xxx> prefix to the <P> 
  2021. or < Hn> tag (a construct supported by current HTML 2.0 browsers). Later on, 
  2022. when HTML 3.0 is established, the label can migrate inside the P or Hn tag as 
  2023. the new ID attribute. Meanwhile, the IPF Resources are handled outside of HTML 
  2024. syntax because they are not a part of HTML. 
  2025.  
  2026.  A Hypertext link is created from any <A HREF=...> tag encountered. SpHyDir 
  2027. requires that the filename or URL not contain any blanks. Other attributes 
  2028. (REL, REV, TITLE) are ignored. 
  2029.  
  2030.  The IMG tag may have SRC, ALIGN, and ALT attributes. Currently, only the LEFT 
  2031. Netscape extended alignment is supported, and that is just a test. An IMG file 
  2032. must have a type of GIF for HTML and BMP for IPF. The free IBM utility GBM can 
  2033. be used to convert GIF to BMP. 
  2034.  
  2035.  ADDRESS is not explicitly supported. When encountered, it is currently 
  2036. embedded in the text of a paragraph as if it were character emphasis. When 
  2037. SpHyDir generates HTML, it includes boilerplate from the HEADER and TRAILER 
  2038. files, and that will generally be the source of the author's name, E-mail, etc. 
  2039. The ADDRESS tag would typically be used in these files and not in the body of 
  2040. the text. 
  2041.  
  2042.  BLOCKQUOTE is sometimes documented as obsolete, and sometimes as current. The 
  2043. HTML 3.0 standard wants to rename it BQ. Previously it was unsupported as a 
  2044. questionable feature.  Now its omission is regarded as a bug that must be 
  2045. shortly fixed. 
  2046.  
  2047.  The &, <, and > entities are converted to ordinary characters on input 
  2048. and are regenerated on output. Currently no other entities are supported. It is 
  2049. the direction of SpHyDir to find a way to support direct editing of ISO 8859-1 
  2050. characters rather than requiring them to be edited. SpHyDir uses some PC-only 
  2051. graphic characters as delimiters for hypertext links and character emphasis. 
  2052.  
  2053.  Forms support is under development. The following information about forms is 
  2054. tentative (as of March 1) and represents work in progress. 
  2055.  
  2056.  The FORM and /FORM tags generate a section of the document represented by the 
  2057. FORM object. Only the more generate POST method will be supported (using GET 
  2058. with forms is sometimes possible, but there are length restrictions that appear 
  2059. to be more trouble than they are worth). The ACTION can be the name of a CGI 
  2060. program for a Unix server, or a name that GOSERVE will recognize as a supported 
  2061. operation on OS/2. 
  2062.  
  2063.  At the moment, there is a shortage of room on the toolbar, the SUBMIT and 
  2064. RESET buttons are ignored on input and are generated automatically on output at 
  2065. the end of the FORM. 
  2066.  
  2067.  Within the FORM area, one can include any other document objects, including 
  2068. Sections, Images, Lists, and links. There is one change to SpHyDir document 
  2069. management. All the previously discussed document objects operate at the level 
  2070. of a Paragraph or larger. Form objects have an integrity of their own, but 
  2071. several check boxes or radio buttons can appear together on the same line. To 
  2072. accomodate this behavior, SpHyDir allows empty paragraphs to exist within a 
  2073. FORM. 
  2074.  
  2075.  A user has always been able to generate an empty paragraph (<P></P>) by 
  2076. dragging a paragraph object to the workarea but then adding no text to it. 
  2077. However, empty paragraphs read in during the HTML scan would be ignored. 
  2078. Essentially, the empty paragraph was treated as a user error that SpHyDir might 
  2079. choose to ignore. However, it turns out that there is no more acceptable way to 
  2080. delimit line breaks in a form. During the HTML scan of an externally generated 
  2081. FORM, SpHyDir will create empty paragraph elements when <P> tags are 
  2082. encountered between form elements, and it will then generate them as: 
  2083. <P></P> 
  2084. <INPUT TYPE="RADIO" NAME="PROT" VALUE="HTTP"> HTTP 
  2085. <INPUT TYPE="RADIO" NAME="PROT" VALUE="GOPHER"> Gopher 
  2086. <INPUT TYPE="RADIO" NAME="PROT" VALUE="FTP"> FTP 
  2087. <P></P> 
  2088. <INPUT TYPE="CHECKBOX" NAME="BIN"> BINARY 
  2089. <P></P> 
  2090. In this example, the three radio buttons will appear on one line, and the 
  2091. checkbox will appear on a separate line following them. Graphically, each line 
  2092. of this HTML appears in SpHyDir as an object, with three empty Paragraph 
  2093. objects, three RadioButton objects, and one CheckBox object in the order given 
  2094. above. 
  2095.  
  2096.  Now we get to one of those wild generalizations on which the whole concept of 
  2097. SpHyDir depends. Forms items have captions. You know that, and I know that, but 
  2098. HTML doesn't know it. In HTML, a check box is just the box: 
  2099. <INPUT TYPE="CHECKBOX" NAME="BIN"> BINARY 
  2100. Syntatically, the last word "BINARY" is outsize the tag. It is just text. If 
  2101. SpHyDir didn't make any stuctural assumptions, it would just appear as ordinary 
  2102. paragraph text. Now we want it to have all the freedom of text (so you edit it 
  2103. with the Text Editor Window, and you can link to it by dropping Link Manager 
  2104. links on it, and it opens the Hotword Window). But, the document view becomes 
  2105. terribly fragmented if this line generates two objects (a CheckBox object for 
  2106. the tag, and a Paragraph object for the caption). 
  2107.  
  2108.  So SpHyDir makes the unsupported generalization that the caption for an Entry 
  2109. Field goes in front of the field, and the caption for a CheckBox or RadioButton 
  2110. goes after the button. Multiline text input areas and Selection Lists don't 
  2111. have a caption (or if they do, it appears as a paragraph above or below the 
  2112. larger areas). Thus Entry, CheckBox, and RadioButton objects have a text 
  2113. component that appears in the SpHyDir work area like paragraph text to the 
  2114. right of the object. The text of the caption can be edited or linked exactly as 
  2115. if it were in a Paragraph object. When the HTML is generated, however, the 
  2116. Entry object text goes in front of the <INPUT> tag, and the CheckBox and 
  2117. RadiButton text goes after it.