Changes to WebLord, the Document Assembly Tool
Logo WebLord v2.2
The Document Assembly Tool

Changes from WebLord v1 to v2

WebLord 2 is a major rewrite of the original software. Although many aspects are unchanged from the original, some have been notably improved, and over a dozen important additions have found their way into the software. A few incompatibilities with the old version have been introduced in an effort to correct flaws in the original design. We hope that these changes are minimal enough to cause no great concern. These changes are summarized below.

This page is designed to give you a fairly detailed summary of these changes and additions. If you have used WebLord 1.x, we would like to point out specifically the deprecations & incompatibilities section below.

Introduced in 2.2

  1. The Date & Time now also evaluates an adjust-seconds property. If given a negative value, such as -86400 (exactly 24 hours) then the effective date will be exactly 24 hours earlier. Through this mechanism it is possible to construct dates forward or backwards at 1-second resolution.

  2. The ${...} sequences in a varfile (see value-type) can now include parameters. The format is ${object(key1=ref;key2='constant';key3=ref ref "constant" ref)}; Newlines are still presenting problems within the ${...} construct, so avoid them. Regardless of this limitation this construct significantly expands the utility of object and property references within a varfile!
  3. Missing </TD> and </TR> elements can now be inserted by Pretty HTML into the HTML stream to help badly implemented browsers, such as Netscape, render tables more gracefully.

Introduced in 2.1

  1. Added post-exec-run property to further enhance your ability to control the uploading process of pages to your ISP.
    The command can use the post-exec commands that were collected into the post-exec-batch to perform a login operation to your ISP, then upload the changed pages. Notice that you must supply the commands that actually perform the login; an example is provided where the post-exec-run command is explained in more detail.

  2. Added delimiters property to assist in enhanced processing of foreach
    Alters the operation of 'foreach' to be referencing each token of a string that is delimited by the character(s) indicated by the 'delimiters' property. This can be used to break up a string into words or lines, for example. When combined with an object that performs an external call to obtain a list of filenames, the return of that object can now be broken up into the individual filenames and each is processed by the 'foreach' as if it had been listed separately in the 'foreach' property.

  3. Documented ignore-error page property


  4. Documented objectstatus property


  5. Added html-reformat property to wordwrap and re-indent HTML output in context-sensitive manner
    The output size may expand due to unnecessary indentations, but some rudimentary checks are made to catch blatant mistakes in the HTML. If you get 'Possible HTML context/nesting error' warnings you should scan the code to determine where the nice indentation begin to fall apart. The problem is somewhere shortly before that spot.

  6. Added support for cgi operations
    This will import GET and/or POST submissions, including CGI-related environment variables, making these available as normal properties in the Site Object.

    CGI mode will be automatically enabled if the environment variables GATEWAY_INTERFACE and/or REQUEST_METHOD are defined when WebLord is invoked, so it is not necessary to use these if your web server sets them for CGI programs (the most popular web server, Apache, does this.)

    To see WebLord in action as a CGI program, try our Anagram Creator!

  7. Explicitly named pages that are to be built are now built within the proper context of their parent page(s)
    This permits subpages to inherit the properties from their parents the way they were designed to be built. In version 2.0 they were accidentally built outside their structural context, which could result in needed properties being unavailable. The operation now does the "right" thing.

  8. Sedecimal can now be used to include arbitrary characters
    Using special sequences ( \01 through \ff ) now allows you to produce ANSI escape sequences or ISO-8859-1 characters by their sedecimal character code (if your computer should be incapable of producing them directly.)
    Special note: although it is possible, the \00 symbol should never be used as it represents a string terminator and will cause unexpected data loss! This is not a bug.

  9. The Page Signature Database is now locked
    Multiple invocations of WebLord (possibly as CGI software) won't lose updates to this file.

  10. First significant Unix support added
    Although WebLord 1.2.3 was available for Linux and Solaris systems, no feedback for these was ever received and no testing ever performed. This has changed with WebLord 2.1: Linux has proved to be a superbly stable, robust, and powerful development environment, not to mention that it's blindingly fast.

    Amiga users should take note: this switch of the development platform has resulted in significantly better code. It is not to be viewed as an abandonement of the Amiga platform! (Now stop huffing and puffing and get back to doing cool stuff with WebLord, ok? :-)

  11. Added actor object property
    This allows an object to perform actions with a value that it produces, but it won't return this value.

  12. Added outputbase argument
    Provides a specific root for relative output paths of page files.

  13. Added createpath argument
    Creates non-existant path elements for output page files.

  14. Implemented long-forgotten trim-lines and trim-result
    These properties are used when the value-type is set to one of the possible file types. They are intended to help trim undesirable whitespace off the ends of lines or just from the input as a whole. They were inadvertently left out during the conversion from 1.x to 2.0 and are now available again (phew!)

  15. Added nosubpages argument
    Allows the subpages property of Page Objects to be ignored.

Introduced in 2.0.1

  1. Fixed a bug that could cause the first and last character of any given string to be "chopped" off.
  2. Fixed several enforcer hits (invalid memory access errors) that involved empty macro argument lists

Major Improvements in 2.0

The following section details the major enhancements to the software. You will note that this section is the most detailed and also has the most numerous entries. WebLord has grown significantly!

  1. Explicitly private and explicitly inheritable properties
    WebLord defines certain properties to have special meaning. In the past this made them absolutely uninheritable, something that was safe, but not always as flexible as could be desired.

    Now, however, objects can inherit value, if, foreach, select-case, etc. from any parent that has defined these as inheritable.

    Likewise, all of the properties that have no special meaning to WebLord are naturally inheritable. To prevent these from being inherited, they can be marked private.

  2. Objects can be static, that is they are evaluated once and their value is then "frozen"
    This is especially important when you have complicated objects whose value actually never changes. This may be the case with images, system dependent information, external files, etc.. after their value has been determined for the first time.

  3. Any reference to the special properties ERROR++ and WARNING++ cause the respective error or warning count to be increased.


  4. Any error message displayed will produce an object reference trace that is designed to help you determine the exact sequence of object references that led to the error.

  5. WebLord will no longer write out a page (nor use the post-exec property) when a page has not changed.
    This feature uses a Page Signature Database file to allow WebLord to keep track of the pages. Use the force argument to force WebLord to write pages no matter if they have changed or not.

  6. The link property of the TEXT object is now user-definable in such a way that you can completely alter its behavior. This provides you with a means to build AmigaGuide® documents as easily as HTML, XML, or whatever else your heart desires.

    The ANCHOR-BEGIN and ANCHOR-END properties/objects will supply the formatting. An example for HTML anchors is provided in the html-page.wl file.

  7. All TEXT objects can also function as macros!
    Instead of just referencing an object as usual, you can also provide an argument list in parentheses. Each argument must be in the form property = value and multiple such arguments must be separated from each other with a semicolon (';'). Example:
    ...
    value = "Hello, " env( VALUE = "user" ) "!";
    ...

    demonstrates the use of an object named ENV to access an arbitrary environment variable. The name of this variable is given with the 'VALUE' property.

    The ENV object could simply be defined thus:

    text env { value-type = "env" }

    Notice that this object defines no VALUE property, wherefore the refering object must supply it. In fact, if the refering object fails to do this (as in the case of a "simple" reference without macro arguments) the ENV object would quite simply fail due to an incomplete definition.

    To prevent a failure, you could define it with a default:

    text env
    {
      value = "nothing";
      value-type = "env";
    }


    If you now merely referenced the ENV object it would have a default VALUE; your failure to override it with one in the macro argument list would leave the default value unchanged.

    Naturally, you could also define the object thus:

    text env
    {
      value = varname;
      value-type = "env";
      varname = "nothing";
    }


    This way you could either override the VALUE property or override the VARNAME property. Your choice!

  8. Object can act as macro arguments, too!
    Consider the following definitions:
    	text UserInfo
    	{
    	  value =	"Name:  " record.name "n"
    			"Email: " record.email "n"
    			"URL:   " record "n";
    	  toString =	'<A HREF="MAILTO:' email '">' name '</A>';
    	}
    	text Udo
    	{
    	  name =	"Udo Schuermann";
    	  email =	"walrus@sprintmail.com";
    	  value =	toString;
    	}
    	text walrus
    	{
    	  name  =	"The Walrus";
    	  email =	"walrus@ringlord.com";
    	  value =	toString;
    	}
        
    We have three objects. The first one is a "generic" information object that referencs NAME and EMAIL properties of an object named 'record' (more on this later). The second and third objects look quite similar: they define NAME and EMAIL properties, in addition to a VALUE property. You could think of these as database records.

    Now, let's define one more object:
    	text AllUsers
    	{
    	  foreach =	Walrus Udo;
    	  do =		UserInfo;
    	  using =	&record;
    	}
        
    This object invokes the UserInfo object using, each in turn, the WALRUS and UDO objects. Notice, however, that the value of the USING property has an ampersand ('&') symbol preceding it: This is a special indicator to WebLord not to evaluate the object (WALRUS or UDO) and make its value available as 'record' but to make 'record' synonymous with 'Walrus' or 'Udo'.

    The effect of this is that the UserInfo object can access 'record' as an object, rather than as a mere value. It can thus access specific fields in the object by name, such as the email address, the name, or anything else your objects may define.

  9. Reference a specific property of any object
    The object and the property must be defined, but you can reference these properties directly. No matter the "special" status of a property (such as IF, SELECT-CASE, VALUE, etc.) such a reference does not evaluate the property.

    Some special objects are defined for use with the special properties below:
    this The current object that is being evaluated
    parent The object that referenced the current object
    page The page of which the current object is a part
    rootpage The top-level page (differs from 'page' object only if the page object is a subpage of the rootpage


    Each object also defines some special properties that cannot be overridden:
    objectname The name of the object
    objecttype The type of the object
    objectdefinition The textual definition of the object in its current state, the way you would type it into the site definition
    objectstatus The textual definition of the object in its current state, including all inherited properties.


  10. Extended conditional expressions

Minor Enhancements

These are lesser additions to the software. They should not produce incompatibilities:

  1. The equal symbol ('=') between object type and object name is now optional.
    WebLord will accept the symbol, but will neither require it, nor use it when it writes output files with the saveas argument.

  2. A special property ECHO allows any TEXT object to display a message.
    This is most useful for diagnostics and when used with IF/THEN/ELSE operations to signal a problem. If you are using any properties of your own by the name 'echo' they will suddenly start "acting funny": use a different name.

  3. When the if property evaluates to TRUE and a then property is not defined, the value property will be used, instead. This may have unexpected side-effects if you are leaving an old value property defined after changing an object by adding an if property without a then. In the past, the superfluous value property would have been ignored.

  4. A more flexible and more extensible way of value typing (see value-type) has been introduced:
    Instead of defining... ...define "value-type = ..."
    value-is-env "env" or "envvar"
    value-is-date-pattern "date" or "date-pattern"
    value-in-file "plainfile" or "plain-file" or "file"
    file-has-variables "varfile" or "var-file"
    n/a "md5"

Deprecations and Incompatibilities

The following changes to the software are important to know and understand. Although we hope that compatibility issues are kept to a minimum, the dynamic nature of WebLord's language and evaluation structures makes it virtually impossible to predict and interpret all the forms in which your creativity may fool a deterministic approach of handling these.

  1. GLOBAL.WL has a new name
    In the interest of labeling the files according to the languages and purposes for which they were designed, the file has been renamed to HTML-PAGE.WL. Please delete your old 'global.wl' file.

  2. The IMAGE object type is deprecated.
    WebLord performs an automatic conversion whenever it encounters an object of type 'IMAGE'. The conversion requires (assumes) that you have included the html-image.wl file. If you did anything fancy with inheritance, the conversion may not produce the expected results: please check your output. See the saveas command line argument to obtain the result of the conversion for inspection. Convert your IMAGE objects along similar lines as soon as possible.

    Fully interpreted image objects are noticably slower than the older, built-in images. For this reason, the conversion of image objects to text objects marks these objects as static so that repeated use of an image results in much faster results. If your old image objects rely on inheritance, you should convert these images manually (or with the help of the saveas argument.)

  3. The old IFDEF and IFNDEF properties are deprecated.
    They are converted to (and possibly merged with) the boolean expressions of an IF property.

  4. The old requires-version property of the site object has been deprecated, although it is still accepted.
    In its stead you should use the new requires-version meta command for each individual include file. WebLord will issue a warning if you do not specify a minimum requirement for each file.

    Please use this setting carefully: WebLord's interpreted and highly dynamic nature makes it impossible for an earlier version of the software to identify advanced features without this information. Omission of this meta command can lead to unexpected missing information if you were to use an old version of WebLord that does not yet understand features of the definition that are designed to take advantage of a later version of WebLord.

  5. The reference to the copyright-notice object is now optional.
    WebLord will still issue a message designed to remind you of this, but it will no longer require this reference. If you do reference the object on all your pages then you will not see the notices. :-)

    The header object that is part of the html-page.wl file includes the copyright-notice object for you.

  6. The old NOEXEC option has been replaced by preexec and postexec
    You are thus required to explicitly enable to pre-exec and post-exec operations, rather than having to remember to suppress it.

This material is Copyright © 1997,1998,1999,2000,2001 RingLord Technologies and Udo Schuermann. All rights reserved. The latest versions of the WebLord software and (this) documentation can be obtained from the WebLord Home Page (the link will only function if you are connected to the internet.)