Index Special Tags Predefined Tags Implementation
Introduction to PReP
    PReP consists mainly of so-called PRePTags and is mostly used for the design of webpages. Due to the simplicity of PReP it is easy to introduce new tags and create a user friendly internet application such as DOC. But it can be used also for other purposes.

    During this introduction we will show how PReP works and what you can do with this powerful tool. If you already used the old version of java PReP, you may want to skip the introduction and read careful the chapter about what's new and what changed.

How it works
    Some of the PRePTags are predefined, that means, you already can use them. You are able to create as many tags as you want. Please read how to define and create new tags. A tag consists of a tag name and a tag value. By calling the tag name, it will give as result the specified tag value back and writes it to a output file or a specified print writer, or it creates a new tag with the result, which you may call then and use it as you want to.
How to write comment
    To insert a comment you have to use twice the at sign (@) and then you may write what ever you want, it will not appear in the output. The sign is valid for one single line - so if your comment is big, make sure that you put the signs at the beginning of every line. You may place any comment where ever you want - just remember that everything behind the comment signs is taken as a comment.
How to detain a tag from compiling
    There is a way to output a whole tag as comment without compiling it. Just append a ":noparse" straight behind the tag name. This may be useful if you want a tag to be shown just as it is, without compiling it.
    An example:
Noparse example
How to insert a file
    If you want to use defined tags from another prep file, you have to include it in your file. To do so you just type at the beginning of the file a hash (#) and then the path and the file name. Make sure that you don't define any tags before the include order. But you may write any comment before and after it. It is possible to substitute the file name with a tag - but make sure to have it defined before, otherwise PReP will not be able to find the file.
    An example:
insert a file
How to use arguments
    You may use arguments in a PRePTag. This is useful if you change something in your tag and you do not know yet what exactly you will change. The name of the argument must be ARG and a consecutive number. For calling the tag with the argument, use the tagname, a pair of colons (':') and the argument, which will look as follows:

    {TagName::some_argument}

    Of course you may use another PRePTag as argument.
    An example:
use an argument
Predefined tags
    Some tags already exist in PReP so you can use them without defining them. They will return a result which is either a new tag or a string which will be written immediately. For detailed information for the predefined tags please have a look at the list of predefined tags.
    Related sites:
list of predefined tags
how to create tags
The different versions of PReP
    There are two versions of PReP. You may use PReP as a commandline version or with a servlet. If you use the servlet version, please make sure that you installed JSDK 2.0 first.
    Related sites:
Commandline version of PReP
PReP as commandline version
    Use the prep.bat file for compiling any PReP file. If you do not have a prep.bat, you may call the program with java com.delec.prep.PReP. If you do not specify any tags or any files, you receive a help output which explains the several options you have. The last argument must be the output file. You may specify different tags by enter the tag name with a dash ('-') and the tag value after. Every tag name must have a tag value. There are however a few special tags. Please have a look at them. You can add as much input files as you want to. PReP assumes that every single word which is not a tag value, is a file.
    An example:
See an example for that
    Related sites:
special tags
PReP as servlet version
    It is necessary, that you installed JSDK 2.0 first and made sure, that the path is correct. This creates a generic servlet for a HTML POST or GET request and uses prep to make a HTML page. The prep file used to generate the page should be stored in a tag called FILE. There are special cookies and parameters at which you should have a look at it.
    An example:
    Related sites:
special parameters and cookies
Class information for the servlet
Implementation of PReP