What is XML Sapiens


Company Vignette has presented 1995 in the market the first commercial system of class CMS (control systems of a content). Since then the number commercial CMS indefatigably grows and nowadays term CMS has got accustomed in the market and, as a rule, does not demand decoding. For last years the set otrytykh the standards has been authorized, allowing to structure the information on sites, to separate her{it} from design, but, still, majority CMS does not follow them. So many years there is standard XSLT, allowing formation of documents from the divided{shared} sources: a XML-file with the structured maintenance{contents} of the document and a XSL-pattern with the description of how the document will be submitted on a site. And formation of the document, can occur on the party{side} of the client. It is enough to pass a browser XML-structure of the data containing the link to a XSL-pattern and a browser "will draw" page in that kind as it was supposed designers. The maintenance{contents} of each page of a site differs, however the form of submission of this maintenance{contents}, usually, is limited a small number of patterns. Thus, XSLT allows us odinozhdy the written pattern of data presentation on a site to use repeatedly. It would seem, she ideal technology for CMS. However universal application of the given technology constrains a number{line} of factors. From them psychological inertia - not predominating factor. The description of functionality of a site with help XSLT - rather labour-consuming problem{task}. Besides the XSL-pattern is too dependent from the XML-document with the data that limits flexibility of decisions on the basis of the given technology.


Thus, XSLT represents conceptually faultless, but in practice the labour-consuming decision. The given circumstance induces developers to search for the new decisions including advantages of authorized open standards and, at the same time, rather convenient in use. One of such decisions - declarative language XML Sapiens (www.xmlsapiens.org < =http%3A%2F%2Fwww.xmlsapiens.org%2F>).

As it is arranged XML Sapiens


As well as XSLT, with each document of a site the certain pattern should be connected. The pattern can contain any code of performance (for example, HTML) and instructions XML Sapiens. In a pattern can be, some files are switched on. For this purpose the instruction sapi:include, close to analogue in the open standard xInclude is used.

<sapi:include href = "adres_fajla_shablona" parse = "template"/>


Other instructions XML Sapiens allow to deliver the maintenance{contents} and functional blocks in the document.


The purpose of this decision to divide{share} the description of structures of the maintenance{contents} and functionality. It allows to create once some set of skeletons of structures of the maintenance{contents} and functionality and further to use it{him} as the designer at construction of a site.

XML Sapiens and the data


XML Sapiens includes such concept as a status of the interface. It allows to define{determine} for the same page of a site various data sets depending on the external or set conditions. We admit{allow}, if the user is authorized on a site, the page can contain one fields of the maintenance{contents} if not it is authorized others. Statuses of a set of fields of the maintenance{contents} of page it is defined{determined} in the separate XML-document. To apply a set it is enough to execute inclusion of a set for the specified status:

<sapi:include href = "adres_fajla_nabora_polej" parse = "fieldset" state = "a2"/>


The set of fields contains instructions of delivery of the data. These instructions connect the specified identifier of the data with the type of a field described in the external XML-document.

<sapi:apply name = "qc.identifikator.value" type = "type" href = "adres_opisanija_tipa"/>


XML the document such as a field, as well as in case of a set of fields, can contain descriptions of type for various statuses of the interface. If in system statuses "administration" and « delivery of the maintenance{contents} » in the first case the data can be submitted in the form of search of the maintenance{contents} are determined, in the second « as is »