Home Links

The data, their performance and forms of the user interface in XML

XML for last years has found the deserved popularity, and already it is no doubt in prospects of his  universal application. The concept " a semantic web " ceases to be abstraction and is confidently embodied during a life. In information cacophony of a worldnet harmony gradually starts to be learned{be found out}. In hands of talented conductors, such as W3C, ISO, OASIS, she can quite turn to the symphony.


Today family XML has such quantity{amount} of standards, that, apparently, they should suffice on all possible{probable} aspects of the world of information technologies. In a general plan all so. But let's go down on the ground and we shall see at how epoch XML has had an effect on banal problems{tasks} of web - development.


To deliver the information, the user needs a site. The maintenance{contents} of a site should be controlled, and it entails division of the data and their performances. The given problem  up to sikh quite often is solved with the help of program technologies shablonizacii. However, now we have technology XSLT. Any document can be presented the data in details structured with help XML. And to define{determine} to these data due graphic registration, it is enough to inform a corresponding XSL-pattern. Language XSL polimorfen also allows high flexibility in formatted transformations of documents. It would seem, he " the Sacred Grail " webs - development. We take on arms toolkit XSL and we reduce speed of development of projects, thus increasing quality.


However if to analyse expenditures of labour at creation of webs - projects comes to light, that the greatest time takes away programming the user interfaces. One business to bring in the information to the document, to deliver to his  user, another - to recreate the interface full-function and convenient for navigation. It is necessary to note as well the tendency of growth of volume of the maintenance{contents} on the Internet, that automatically does{makes} the importance of efficiency of the user interfaces of higher.


Technology XSL allows to operate performance of documents theoretically with any forms of the user interface. With help XSL it is possible to analyze a status of the user interface and to create algorithms of data presentation, proceeding from these conditions. But XSL operates with data XML and that in XSL to set display of the simple navigating menu, it is required to prepare a corresponding XML-file of the data preliminary.


In practice leaves so, that more often layers of a XSLT-pattern of the document contain a mix of algorithms of forms of the user interfaces and registrations. And, logic of formation of the given forms of interfaces produblirovana in program code CMS of a site. How to avoid it is superfluous a program code? How to achieve more evident kind of performance of algorithms of forms of the user interface?


In the autumn of 2004 company Red Graphic Systems has published specification XML Sapiens. This technology applies for a role of "layer" between XML and XSL. When processor XML Sapiens meets the link to a file of scripts of forms of the user interface, the initial XML-file extends the corresponding data. We shall say, we wish to generate the page containing the vertical menu of a site. We will need to create a file of the script (interface.sapi) and to describe in him the form of the user interface (DDC menu). We specify, that under any conditions of the environment of an environment we wish display of the maintenance{contents} of the menu. Using a design sapi:for-each, we can request the data required to us of system function CMS.


Further we control transfer of these data. We inform what and in what cases it is necessary to return in a course of transfer. To direct data dynamically generated by the script in initial XML, it is necessary to place only in him indexes. I.e. after the analysis of a file of the script interface.sapi processor XML Sapiens will expand an initial XML-file of the data in that degree in which it is necessary for the subsequent XSLT-transformation.


Initial XML:

<? xml version = " 1.0" encoding = "UTF-8"?>


<? xml-stylesheet type ='text/xsl ' href ='template.xsl '?>


<? xml-sapi type ='text/xml ' href ='interface.sapi '?>


<content xmlns:sapi = " http: // www.xmlsapiens.org/spec/sapi.dtd "


xmlns:xlink = " http: // www.w3.org/1999/xlink ">


<data1> data1 </data1>


<data2> data2 </data2>


<menu> <sapi:apply name = "ddc.menu.value"/> </menu>


<title> <sapi:apply name = "qc.title.value"> </title>


<publication> <sapi:apply name = "qc.publication.value"> </publication>


</content>


Script XML Sapiens in a file interface.sapi:


<? xml version = " 1.0" encoding = "UTF-8"?>


<sapi version = " 1.0" xmlns:sapi = " http: // www.xmlsapiens.org/spec/sapi.dtd ">


<sapi:ddc name = "menu">


<sapi:choose>


<sapi:when exp = "TRUE">


<sapi:for-each select = " get_tree () ">


<sapi:choose>


<sapi:when exp = "TRUE">


<sapi:code>


<row sapi:id = "this.this.id.value"


sapi:activity = "this.this.currentpage.value">


<link> <sapi:apply name = "this.this.href.value"/> </link>


<item> <sapi:apply name = "this.this.title.value"/> </item>


</row>


</sapi:code>


</sapi:when>


</sapi:choose>


</sapi:for-each>


</sapi:when>


</sapi:choose>


</sapi:ddc>


</sapi>



Algorithm of script XML Sapiens (interface.sapi):


Generated XML:

<? xml version = " 1.0" encoding = "UTF-8"?>


<? xml-stylesheet type ='text/xsl ' href ='template.xsl '?>


<content xmlns:sapi = " http: // www.xmlsapiens.org/spec/sapi.dtd "


xmlns:xlink = " http: // www.w3.org/1999/xlink ">


<data1> data1 </data1>


<data2> data2 </data2>


<menu>


<row id = "01" activity = "1">


<link>/intro / </link>


<item> Introduction </item>


</row>


<row id = "02" activity = "0">


<link>/chapter1 / </link>


<item> Chapter 1 </item>


</row>


<row id = "03" activity = "0">


<link>/chapter2 / </link>


<item> Chapter 2 </item>


</row>


</menu>


<title> <! [CDATA [Introduction]]> </title>


<publication> <! [CDATA [<p> Content </p>]]> </publication>


</content>



It is necessary to recognize, that transfer of instructions CMS and reception of the claimed data directly from the script in many respects simplifies development of webs - projects. The similar approach allows to abstract from the system programming language. Taking into account this moment, directly in script XML Sapiens it is possible to request at CMS the administered maintenance{contents} of the document. For this purpose it is enough to place corresponding indexes in initial XML.


The circuit of formation of the displayed document:


It is difficult to speak something about prospects XML Sapiens now. As against mentioned XSL, he is not authorized W3C the standard. However the problems{tasks} opened in specification XML Sapiens, namely branch of algorithms of forms of the user interfaces from data presentation, presentation and availability of the description of these algorithms, are actual enough. Perhaps this project will draw attention of community of developers. And it could lead to to occurrence of new technologies for increase in quality and profitability of webs - projects.



Home Page
Compression of pages on PHP
Functions of a paginal conclusion in PHP
PHP a script for automatic definition of the coding of the text:
XML Sapiens - magic of revival of sites
XML: opportunities and prospects
The data, their performance and forms of the user interface in XML
It is a little about OPML
Protection of mail
Importation of the information from an another's site on the site in the design
The forum working with database MySQL
The main page of a forum
Paginal conclusion from tables MSSQL with help PHP
Small cunnings
We print rationally or one more way of protection of the information
Site from within
The link - business not artful
Ideology HTML
Effect bukvicy
Ways of storage of the dynamic data