XMLSapiens.org :: Dynamic Data Container (SAPI:DDC)
logo of XML Sapiens
XML Sapiens Yahoo Group
Join Now
6.3.3 Dynamic Data Container (SAPI:DDC)
Beginning » XML Sapiens v.1.1 Specification » 6. Body of the SAPI Document » 6.3 Data Containers » 6.3.3 Dynamic Data Container (SAPI:DDC)

<!ELEMENT sapi:ddc (sapi:author*, sapi:comments?, sapi:choose?>
<!ATTLIST sapi:ddc -- dynamic data container --
name  %Text   #REQUIRED  -- container name --
title  %Text   #IMPLIED  -- container title --
category %Text   #IMPLIED  -- container category --
system  %Text   #IMPLIED  -- system code --
ns  %Text   #IMPLIED  -- namespace --
status  %Text   #IMPLIED  -- container status  --
parent-id %Text   #IMPLIED  -- parent section identifier  --
cache  %Text   #IMPLIED  -- container status  --
mdate    %Datetime #IMPLIED  -- date of latest modification --
indexdate %Datetime #IMPLIED  -- date index --
indextitle %Text  #IMPLIED  -- title index --
indexdesc %Text  #IMPLIED  -- abstract index --
mask     %Text  #IMPLIED  -- access mask --
>

Start tag: mandatory, End tag: mandatory

Attributes definition

name = %Text [CN]

Mandatory. The value of this attribute contains a data container name.

title = %Text [CI]

Recommended. The value of this attribute contains the data container title that specifies the container in the list.

category = %Text [CI]

Recommended. The value of this attribute specifies the category of the dynamic data container (see Categories of Dynamic Data Containers).

system = %Text [CN]

Deprecated. If an element contains this attribute, its value specifies the CMS system programming language used in the body.

ns = %Text [CN]

Optional. The value of this attribute contains a pointer to the namespace assigned to the given data container.

status = %Text [CN]

Optional. If an element contains this attribute, its value specifies the status of the container activity.

parent-id = %Text [CN]

Optional. Parent section identifier.

mdate = %Datetime [CN]

Optional. This attribute contains the date and time of the latest document modification.

Attributes of information channel containers:

indexdate = %Datetime [CN]

Optional. This attribute contains the name of the query container that corresponds to the date of the information channel node.

indextitle = %Text [CN]

Optional. This attribute contains the name of the query container that corresponds to the title of the information channel node.

indexdesc = %Text [CN]

Optional. This attribute contains the name of the query container that corresponds to the abstract (summary) of the information channel node.

mask = %Text [CN]

Optional. This attribute contains the mask of access to the content of the information channel element.

Dynamic data containers refer to the fragments of the document displayed on the site. The content of the containers is generated on the basis of a functional algorithm. These containers provide the description of functional algorithms. Dynamic data containers are the so-called functional solutions of a CMS site interface.

A container can be called from the presentation template of the document displayed on the site, and from other containers using the SAPI:VALUE-OF element (see Container Pointer (Element SAPI:VALUE-OF)), or the SAPI:%Attribib attribute (see Pointers).

A dynamic data container contains elements SAPI:AUTHOR, SAPI:COMMENTS and SAPI:CHOOSE. The last element (SAPI:CHOOSE) is a handler of the CMS environment status condition. If an expression (Element SAPI:EXP or Attribute EXP) complies with the «TRUE» value, the content of the condition element (SAPI:WHEN) is executed. Conditions may contain the data presentation code (see SAPI Model of Data Presentation), pointers to containers or an enumeration handler (SAPI:FOR-EACH). The enumeration handler calls the CMS application, the name of which is specified in the SELECT attribute of the SAPI:FOR-EACH element. This application returns a set of nodes to the parser. The enumeration handler may contain a conditions processor. A condition handler is called as many times as there are elements in the nodes set returned by the application. Conditions may contain a data presentation code and data pointers. After each iteration of the enumeration handler the content of the “TRUE” value is returned. The nodes of the set contains the data returned by the application. The data is available in the nodes properties (see CMS Application Modes Set) .

Example of a dynamic data container:

<sapi:ddc name="var2" title="Example of a dynamic data container" ns="site1" category="infochannel.news" mdate="2004.11.05T08:15-0500">
 <sapi:author> 
 <sapi:name>Dmitry Sheiko</sapi:name> 
 <sapi:email>sheiko@cmsdevelopment.com</sapi:email> 
 <sapi:uri>www.cmsdevelopment.com</sapi:uri></sapi:author>
 <sapi:comments> it serves to …</sapi:comments> 
<sapi:choose> 
 <sapi:when title="Main page selection condition"  exp="or(eq('argv.0.value', 'home'), eq('argv.0.value', ''))">
 Hello world! It's the home page! it's var1 — <sapi:value-of name="env_var1.value" /> 
 when value into the html-tas <input name="feedback" value="" sapi:value="qvar1.value" /> 
 </sapi:when> 

 <sapi:when exp="eq('var1.value',1)" title="Enumeration condition"> 
  <sapi:for-each select="" name="enum" title="Enumeration itself"> 
  <sapi:choose>  
   <sapi:when exp="1">  
   Display the enumeration 
   string — arguments <sapi:value-of name="this.this.counter.value" />  
   </sapi:when> 
  </sapi:choose> 
  </sapi:for-each> 
 </sapi:when> 
</sapi:choose>
</sapi:ddc>

 

Contents

6.3.3.1-.14 Attributes
6.3.3.14 Element SAPI:CHOOSE
6.3.3.15 Element SAPI:WHEN
6.3.3.16 Element SAPI:CODE
6.3.3.17 Element SAPI:EXP
6.3.3.18 Element SAPI:FOR-EACH


(C) 2004-2006 Red Graphic Systems. All Rights Reserved. Red Graphic Systems liability, trademark, document use and software licensing rules apply. Your interactions with this site are in accordance with our public and Member privacy statements.