logo of XML Sapiens
XML Sapiens Yahoo Group
Join Now
6.3.3.18 Element SAPI:FOR-EACH
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) » 6.3.3.18 Element SAPI:FOR-EACH

<!ELEMENT sapi:for-each (sapi:comments?, sapi:choose? )>
<!ATTLIST sapi:for-each -- enumeration handler  --
select  %Text   #REQUIRED  -- pointer to a CMS application --
name  %Text   #IMPLIED  -- enumeration name --
title  %Text   #IMPLIED  -- enumeration title --
status  %Text   #IMPLIED  -- handler status -
>

Start tag: mandatory, End tag: mandatory

Attributes definition

select = %Text [CN]

Mandatory. The value of this attribute contains a pointer to the CMS application.

name = %Text [CN]

Mandatory. The value of this attribute contains the enumeration name.

title = %Text [CI]

Mandatory. The value of this attribute contains the enumeration title specifying the enumeration during site debugging.

status = %Text [CN]

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

Conditions (see Element SAPI:WHEN) may contain an enumeration handler (this element). An enumeration handler calls the CMS application, the name of which is specified in the SELECT attributes. The application returns a nodes set (see CMS Application Nodes Set) to the CMS parser. An enumeration handler may contain a condition processor, which is called as many times as there are nodes in the set returned by the application. Conditions, in their turn, may contain a data presentation code and data pointers. After each iteration of the enumeration handler the content of the “TRUE” value is returned. For example:

<sapi:for-each select="get_tree('/company/')" name="enum" title="Enumeration"> 
<sapi:choose> 
 <sapi:when exp="neq('this.variable.value','last_argv.value')">  
   <sapi:code>  
   <a sapi:href="this.this.href.value">  <sapi:value-of name="this.this.title.value" />  </a>  
   </sapi:code> 
 </sapi:when> 
   <sapi:when exp="neq('this.this.position','this.this.length')">  
   <sapi:code>  |   </sapi:code> 
 </sapi:when> 
 <sapi:when exp="eq('this.variable.value', 'last_argv.value')">  
   <sapi:code>  
   <sapi:value-of name="this.this.title.value" />  
   </sapi:code> 
 </sapi:when> 
</sapi:choose>
</sapi:for-each>

6.3.3.18.1 Attribute select

Attributes definition

select = %Text [CN]

Mandatory. The value of this attribute contains a pointer to the CMS application (see Recommended CMS Applications).

6.3.3.18.2 Attribute name

Attributes definition

name = %Text [CN]

Mandatory. The value of this attribute contains the enumeration name.

6.3.3.18.3 Attribute title

Attributes definition

title = %Text [CI]

Recommended. The value of this attribute contains the enumeration title specifying it during site debugging.

6.3.3.18.4 Attribute status

Attributes definition

status = %Text [CN]

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

(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.