~sightRipple Homepage - Documentation
welcome
news
documents
download
screenshots
links
contact

HTMR Standard Definition

Table Of Contents

  • Introduction

    The HTMR Standard is based on the principle that homepages can be updated from one (or more) definition files that the single HTML file has been linked to. HTMR stands for HyperText Modeling Reapplier, and should never be confused with HTML. The HTMR system is both a preprocessor and based on the idea that the HTML files created with HTMR should be readible without the definition file and without having to let the text ocuppy two folders: one for the project files the project are created from and the homepage itself as many other preprocessors. What you need is simply to design your homepage with the look you want, find the spots that will be repeated throughout the homesite and encapsulate them in HTMR Definition tags and copy the content to the HTMR Definition file.

    The Definition file

    The HTMR Definition file consists of two parts, one of which can be excluded.

    Filenames

    This part of the Definition file can be excluded.

    The Filenames part of the Definition file is simply a list of files seperated by a new line. Clients/ editors must accept both Line feed, Carriage Return and any combination of the two as a new line.

    Example of a File list

    index.html
    html/news.html
    html/interests.html
    html/contact.html
    

    Definitions

    This part must be present.

    The Definitions list is a text database of HTML or other content seperated by the names of the definitions on a line of its own. The definition names are formatted as follows: >>definition name<<. This approach have been chosen because no such combination of characters exist in the ordinary HTML definition and can as such not occur as content in any of the definitions. The Definition names can contain any character from any character set, as long as you simply make sure you will be able to reproduce the exact same characters in the Definition tag in the HTML file.

    The Definitions are nested in their nature and if a definition contains a definitions tag, it means that it should be replaced with the content of that definition. This does not apply, though, if the definition requested by the definition tag is the same tag as it occurs in, or if the tag is defined before the definition that requests it. I.E. The definition requested must be defined after the definition requesting it.

    The following example contains two definitions: head and footer. Both are shown with the definition name

    Example of a Definitions list

    >>head<<
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
    <HTML>
    <HEAD>
    <TITLE>A Homepage</TITLE>
    </HEAD>
    <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" ALINK="#FF0000" VLINK="#00FF00">
    >>footer<<
    <HR>
    <DIV ALIGN="CENTER"><SMALL>This homepage was created by John Doe on September 24th, 2000</SMALL></DIV>
    </BODY>
    </HTML>

    The HTML file

    In an HTMR enhanced HTML file, you will find the following two things that are there because of the HTMR standard: The Link tag and the Definition tag. The Link tag is not required and does not have to point to the same Definition file as the one that requested the file, and furthermore, the file does not have to be listed in the Definition file File list.

    The Link tag

    This can be ommitted and does not have to point to the HTMR file that requested it. Also it can occur more than one time. If more HTMR files are linked to from the same HTML file and the same definition shows up in two or more of the linked HTMR Definition files, the first definition (i.e. the definition in the file that is first in the list of link tags) will be one to apply.

    The link tag is a relative link tag and the type should, even though the standard is not approved by the ISO comission you should set the type to text/HTMR, as you see bellow

    Examples of link tags

    <LINK REL="./mysite.htmr" TYPE="text/htmr">
    <LINK REL="http://sightripple.sourceforge.net/sripple.htmr" TYPE="text/htmr">

    The Definition tag

    This part must be present if you want to apply anything to the file. If the file is listed in the HTMR Definition file without containing any HTMR Definition tags, it still means, though, that it must be processed by a client as mentioned bellow.

    The Definitions tag is defined in two parts: The start tag and the end tag. They are both normal comment tags as defined in the HTML definition by (i.e. a comment tag is as follows <!-- comment comment comment... -->), with a specifics as to what the comment is. The start tag is defined as being a comment tag where the comment is the comment tag start (<!--), a leading space, a star (*), the definition name, a trailing space and the end of the comment tag (-->). The end tag is defined as the start tag, but with a slash (/) after the star. If no end tag is present, a client should act as if one existed directly after the start tag and then insert the definition content between them. If the processor is not a client but an editor/ preprocessor it should actually do this (i.e. place an end tag after the start tag and insert the definition content between them). The following examples are listed one pair on each line.

    Examples of Definition tags

    <!-- *head -->
    <!-- *footer --> <!-- */footer -->

    Editor/ processor side

    Client side

    This is essentially a wish-list, as currently, this standard is non-approved by W3C and not implemented by anyone but the creator. If you wish to implement this into your program, please do so and contact the creator of the definition when you have a working copy so that he can review it, or simply contact him and tell him you use it.

    When a client is pointed at a HTMR Definition file, it should donwload the entire definition file and then start downloading the first file in the file list and display it. If no file list is present, search for a file in the same folder as the definition file named "index2.htm". A client should search for any Definition tags in the downloaded page and replace these with the content of a definition from the Definition file. If the definition file does not have any definitions of this name or Link tags to other Definition files are present, then the client must search for and download any linked Definition file and replace for the definition in this file/ these files.


    Created by Leinir Turthra. Released under the GNU Public Licnese (GPL) licence

    SourceForge Logo Designed with ~sightRipple - A HTML Editor with a twist... Graphics by The Gimp
documents
~sightRipple is released under the GPL license... Visit http://www.gnu.org/copyleft/ for more info on the licence