Platformo-independent dynamic site - a myth or a reality?
Whether the website can be independent of a platform? Certainly, if he is submitted in static HTML. And what about a dynamic site? The interactive site can be submitted in Macromedia Flash. Partly interactive and not absolutely a site - in a PDF-format. And the dynamic site will demand the program interface on the party of the server which in turn will demand server applications. Total, for creation of an independent copy of a site it is required to create the web - server, and to recreate on him the program environment similar to the environment of an initial site. Really there are no alternatives? Let's look that we can make for bearableness of our projects.
Let's start with that our site is a set of the documents anyhow connected with each other. Each document represents synthesis of blocks of the maintenance{contents} (data) and graphic design (registration). Besides the site contains the user interfaces, for navigation under documents, sortings, kills, the reporting, etc. In other words, components of a dynamic site: the data, registration, structure, interfaces. That, we shall try "to turn" in XML all this information.
Registration
Registration of a site can include a pattern specifying structure of the document and the information on graphic design. The first means a skeleton with indexes on the data, the second (X) HTML+CSS or XSLT or other format of performance. In any case, the basic information on registration is already submitted in a format or XML, or in an adjacent format.
The data
As we already spoke, the document can include the set number of blocks of the maintenance{contents}. It means, that we should define{determine} all elements of the maintenance{contents} of the document in a XML-file.
Example 1: the Maintenance{Contents} in XML
<data>
<row ip = " 127.0.0.1" date_create = " 2005-01-05 15:22:01 ">
<doctitle> <! [CDATA [Introduction]]> </doctitle>
<doccontent> <! [CDATA [<p> Content </p>]]> </doccontent>
</row>
</data>
In the given example elements of the maintenance{contents} doctitle and doccontent are given. Apparently, they are descendants of element ROW. If the document includes some pages due to this element you can divide{share} their data without effort.
Structure
The structure defines{determines} how documents of a site are connected among themselves. More often the structure is represented as a hierarchical tree. Give also we from this we shall proceed at formation XML. And how? How to be with multidimensional attitudes{relations} of objects? About vneierarkhicheskikh communications{connections} of objects we also shall switch on the information in XML. We shall consider an example:
Example 2: Structure in XML
<tree>
<treeitem var = "root" id = "id_0" visible = "true" owner = "root" group = "wheel" permissions = "770">
<title> The Website </title>
<treeitem var = "en" id = "id_1" visible = "false" owner = "root" group = "wheel" permissions = "777">
<title> English </title>
<link type = "arc" role = "languages" from = "id_5" to = "id_5"/>
<template> main.tpl </template>
<treeitem var = "virtual" id = "id_4" visible = "false" owner = "root" group = "wheel" permissions = "770">
<title> Year mask </title>
<template> main.tpl </template>
</treeitem>
</treeitem>
<treeitem var = "ru" id = "id_5" visible = "false" owner = "root" group = "wheel" permissions = "777">
<title> Russian </title>
<link type = "arc" role = "languages" from = "id_1" to = "id_1"/>
<template> main_ru.tpl </template>
</treeitem>
</treeitem>
</tree>
The hierarchical structure where objects of structure of a site are submitted by elements TREEITEM is above resulted. This element contains the following attributes:
? Var - defines{determines} component URI for the current document
? Id - the identifier of the document for DOM
? Visible - a status of the document for in an interactive tree
? Owner - the owner of the document
? Group - the user group of the document
? Permissions - rights on access to the document
As you have for certain guessed proceeding from an example, the principle of purpose of the rights to documents is inherited from UNIX. 3 figures in attribute Permissions specify, whether can other change / the owners / ``UT»»b/uJAS to delete / to look through the document.
Element TITLE contains the name of the document. In the name inverted commas and more than one line of the maintenance{contents} are supposed. Element TEMPLATE contains a name of a file with a pattern of registration.
And now the most interesting. Element LINK describes vneierarkhicheskie communications{connections} of documents. We shall say, on our site documents on books are submitted. They are sorted on subjects of the maintenance{contents}. However it is necessary for us to divide{share} books in a soft cover and books in firm binding. We place in the description of the document of the book or <link role = "hard_cover">, or <link role = "soft_cover">. If "mirror" of the certain document in a new position of structure we is necessary for us use <link type = "mirror" id = "id_of_document"> or <link type = "datamirror" id = "id_of_document">, when "zerkalirujutsja" only given, but not a pattern. We admit{allow}, direct communication{connection} is necessary for several documents for us - we bring <link type = "location" role = "see_also" from = "id_of_document">. I.e. the current document is the descendant for set in attribute FROM, to an attribute "see_also". And, at last, well-known « an arch of detour ». In an above mentioned example it is supposed, that sections of language versions of a site are connected among themselves an arch of detour. Recording <link type = "arc" role = "languages" from = "id_5" to = "id_5"/> specifies where from the current document to move on directions "forward" and "back".
Whether a lie, it is similar on xLink from W3C? There is a question: « What for it was required to think out something when is present authorized W3C the standard? ». Whether see if to represent structure of a site the list xLink and to address documents vzaimonezavisimymi URI further will practically operate similar structure inconveniently. In itself the banal problem leave / s«nbu¿Feh/»SUS¡SJAF¿/JA¬«»¿U«ubFeh section of structure can to become a huge stumbling-block.
Interfaces
So, we have already described the data, registration and structure in XML. whether we in XML can describe similarly logic of interfaces? That as can be made it is in details described in specification XML Sapiens (<http://www.xmlsapiens.org>) including in Russian, and shared realization is located to the address <http: // sapid.sf.net>.
In given clause{article} I have presented only a variant of a transport format for dynamic sites. By the way speaking, the variant is practically tested on project SAPID (http://sapid.sf.net). It not is the guide to action, but ground for reflections. Perhaps, this concept will push you to your own universal and practical decision.

|