Location: PHPKode > scripts > XML Sapiens Processor > xml-sapiens-processor/examples/ddcsample1.xml
<?xml version="1.0"?>
<sapi version="1.1" xmlns:sapi="http://www.xmlsapiens.org/spec/sapi.dtd"> 
	<sapi:ddc name="ddcsample1">
	<sapi:author>
		<sapi:name>Dmitry Sheiko</sapi:name>
		<sapi:email>hide@address.com</sapi:email>
		<sapi:url>www.cmsdevelopment.com</sapi:url>
	</sapi:author>
	<sapi:comments>Example of DDC which shows values list</sapi:comments>
	<sapi:choose>
		<sapi:when exp="eq(this.param.param1.value, 'display')">
		        <sapi:for-each select="sample()" name="enum" title="We are receiving sample data array">
					<sapi:choose>
						<sapi:when title="If row is first" exp="eq(this.this.counter.value, 1)">
					        <sapi:code>
								<strong><sapi:apply name="this.this.title.value" /></strong><br />
					        </sapi:code>
						</sapi:when>
						<sapi:when  title="If row isn't first" exp="neq(this.this.counter.value, 1)">
					        <sapi:code>
								<sapi:apply name="this.this.title.value" /><br />
					        </sapi:code>
						</sapi:when>
					</sapi:choose>		        
				</sapi:for-each>
			</sapi:when>
		</sapi:choose>	
	</sapi:ddc>
</sapi>
Return current item: XML Sapiens Processor