XML Sapiens and functionality


In a pattern of page instructions of search of the script of functionality also can contain. The algorithm of this script is described in the set XML-file.

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


The document of the description of functional algorithm (DDC) contains instructions of the analysis of conditions, is similar XSLT. Syntax DDC also allows to refer to applications CMS which, according to the transferred{handed} parameters, return dataflows for the further analysis of conditions.

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

<sapi:ddc name = "sample">

<sapi:choose>

<sapi:when exp = " eq (this_record_id.value, 0) ">

<sapi:for-each select = " cms_application () " name = "enum">

<sapi:params>

<sapi:param name = "param1"> value1 </sapi:param>

<sapi:param name = "param2"> value2 </sapi:param>

</sapi:params>

<sapi:ifempty> Records not found </sapi:ifempty>

<sapi:fallback> CMS-application error </sapi:fallback>

<sapi:choose>

<sapi:when exp = " gt (this.this.peremennaja_iz_potoka_dannykh.value, 0) ">

<sapi:code>

Sample code, *this.this.».value;

</sapi:code>

</sapi:when>

</sapi:choose>

</sapi:when>

</sapi:choose>

</sapi:ddc>

</sapi>


At search of the functional script the instruction{indication} of parameters of search is supposed, repeated use of functional scripts allows.

<sapi:apply name = "ddc.menu.value" href = "  =http%3A%2F%2Fsite.com%2Fddc%2Fmenu.xml ">

<sapi:param name = "param1"> value1 </sapi:param>

<sapi:param name = "param2"> value2 </sapi:param>

</sapi:apply>

As you can see, XML Sapiens allows to prepare a set of descriptions of structures of the data, types of fields of the maintenance{contents} and functionality and further to use at designing a site. The opportunity of repeated use of these components reduces time of development of webs - projects, allows to avoid system programming. And, XML Sapiens it is universal. He can be applied in CMS, written on any program language.


Language exists more than year, and the second version of language recently has been published. It inspires hope that language will be and to develop and be used further. For today on the basis of this language function all a little CMS. However if this number will increase, the exchange of functional decisions between the developers using various CMS can become usual business.


Links on a subject:

Russian-speaking variant of specification XML Sapiens 2.0: http://xmlsapiens.org/spec/ru_sapi20.pdf < =http%3A%2F%2Fxmlsapiens.org%2Fspec%2Fru_sapi20.pdf>

The press release about new versions of language: http://sitesapiens.ru/news/4256/ < =http%3A%2F%2Fsitesapiens.ru%2Fnews%2F4256%2F>


The information on the author

Dmitry Shejko

Conducting{Leading} programmer Red Graphic Systems (www.redgraphic.ru < =http%3A%2F%2Fwww.redgraphic.ru%2F>)


It is borrowed{occupied} with development of the software since 1987. Since 1998 has published more than 50 technical clauses{articles} in the specialized editions. Since 2001 develops architectural decisions and tool means for management of the maintenance{contents} (Content Management, CMF, ECM).