Note that there are some explanatory texts on larger screens.

plurals
  1. PONested loops does not work correctly for xslt
    primarykey
    data
    text
    <p>I have been using a CMS which is called Umbraco(umbraco.org) and for displaying flash news on the website using SlideShowPro Standalone product(www.slideshowpro.net)</p> <p>In brief I created a section on admin panel as follows.</p> <p>-Flash(which has a xslt file)<br/> - Month name<br/> - A node with image<br/> - A node with video<br/></p> <p>Every month I will be creating a node with name of the month and add image and videos to them. Month node might have all image or video perhaps both are mixed. I do not have any input xml file cause on SlideShowPro Standalone has only a file which outputs desired xml file for flash</p> <p>here is the xml file:</p> <pre><code>&lt;album id="ssp" lgPath="" tnPath="" title="Album One" description="" tn=""&gt; &lt;img src="1.jpg" id="id1" title="" caption="" link="" target="_blank" pause="" /&gt; &lt;img src="1.f4v" id="id1" tn="" title="" caption="" link="" target="_blank" pause="" vidpreview" /&gt; &lt;/album&gt; </code></pre> <p>What I did in xslt file is;</p> <pre><code>&lt;xsl:for-each select="$currentPage/node [string(data [@alias='umbracoNaviHide']) != '1']"&gt; &lt;album lgPath="http://localhost" tnPath="http://localhost" title="{data[@alias = 'albumTitle']}" description="{data[@alias = 'albumDescription']}" tn="http://localhost"&gt; &lt;xsl:for-each select="node"&gt; &lt;xsl:if test = "string-length(./data [@alias = 'image']) &amp;gt; 0" &gt; &lt;img src="{data[@alias = 'image']}" title="{data[@alias = 'title']}" caption="{data[@alias = 'caption']}" link="{data[@alias = 'link']}" target="_blank" pause=""/&gt; &lt;/xsl:if&gt; &lt;xsl:if test = "string-length(./data [@alias = 'video']) &amp;gt; 0" &gt; &lt;img src="{data[@alias = 'video']}" tn="http://localhost" title="{data[@alias = 'title']}" caption="{data[@alias = 'caption']}" link="{data[@alias = 'link']}" target="_blank" pause="" vidpreview="/flash/gallery/album2/video/1_preview.png"/&gt; &lt;/xsl:if&gt; &lt;/xsl:for-each&gt; &lt;/album&gt; &lt;/xsl:for-each&gt; </code></pre> <p>and that outputs</p> <pre><code>&lt;album lgPath="http://localhost" tnPath="http://localhost" title="" description="" tn="http://localhost"&gt;&lt;img src="/media/951/untitled.png" title="örnek" caption="örnek" link="" target="_blank" pause=""/&gt;&lt;img src="/media/1026/1.f4v" title="flash" caption="flash" link="" target="_blank" pause=""/&gt;&lt;/album&gt; </code></pre> <p>Even though Larsh pointed out that I should use statament, the result is same...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload