Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>UPDATE</strong>: @deniz_seaside, please give us the XML document and also see it for the first time.</p> <p>Then, probably, you'll write your transformation again, this time much better.</p> <p><strong>Here is how to obtain the XML document that you don't have</strong>: just apply this transformation to this unknown document:</p> <pre><code> &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; &lt;xsl:output omit-xml-declaration="yes" indent="yes"/&gt; &lt;xsl:template match="node()|@*"&gt; &lt;xsl:copy&gt; &lt;xsl:apply-templates select="node()|@*"/&gt; &lt;/xsl:copy&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p><strong>Or even shorter</strong>:</p> <pre><code>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; &lt;xsl:output omit-xml-declaration="yes" indent="yes"/&gt; &lt;xsl:template match="/"&gt; &lt;xsl:copy-of select="."/&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <hr> <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; </code></pre> <p>The second <code>&lt;xsl:for-each&gt;</code> is most likely incorrect. It will select for processing all nodes named <code>node</code> of the current node, which is also named <code>node</code>. Usually a node named <code>node</code> doesn't have children named <code>node</code>, too.</p> <p>The solution is to remove the second <code>&lt;xsl:for-each&gt;</code> instruction and leave its content ( body) in the body of the first <code>&lt;xsl:for-each&gt;</code> instruction.</p> <p><strong>Do note</strong>:</p> <ol> <li><p><strong>As you haven't provided any source XML document, your problem is most likely duew to the bad weather</strong>.</p></li> <li><p><strong>Never use the name <code>node</code></strong> for an element, attribute or processing-instruction. You are increasing the chances of getting confused and committing errors by a factor of 1000.</p></li> </ol>
 

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