title: How to code Umbraco XSLT to retrieve Nodes from unrelated tree
body: <p>I have an Umbraco site for personal use that I want to also use as a blog.</p>
  
  <p>I'm trying to put together the XSLT to grab the top three posts from the nodes in the Blog tree (node id = 1063) and display these on a tab page that is incorporated into the front page.</p>
  
  <p>The following image illustrates the node hierarchy:</p>
  
  <p><img src="https://i.stack.imgur.com/l73iQ.png" alt="Umbraco site nodes"></p>
  
  <p>With my extremely limited appreciation of XSLT, I'm unable to grab the node ID of the "Blog" id and take the 3 pages below that to display in the "Top Posts" part of my site which is found under the "Frontpage Tabs" node. All the examples I find work with the "current page", which is typically the top-level node, "Personal Site".</p>
  
  <p>How should I accomplish this?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The rendered output is actually blank on the published page (even after republishing the entire site) but the preview displayed in the back office rich text editor for the "Top Posts" tab content is displayed correctly.</p>
  
  <p>The XSLT I'm using looks like this:</p>
  
  <pre><code>&lt;xsl:template match="/"&gt;
    &lt;ul&gt;
      &lt;xsl:for-each select="umbraco.library:GetXmlNodeById(1063)/umbBlogPost [@isDoc]"&gt;
        &lt;li&gt;&lt;a href="{umbraco.library:NiceUrl(@id)}"&gt;&lt;xsl:value-of select="@nodeName"/&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;/xsl:for-each&gt;
    &lt;/ul&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>The HTML shown in the tab's Rich Text Editor looks like this:</p>
  
  <pre><code>&lt;div umb_macroalias="Dn.BlogListTopThreePosts" ismacro="true" onresizestart="return false;" umbversionid="cb1efb8d-f58c-424b-9c12-df14ac5652d9" umbpageid="1115" title="This is rendered content from macro" class="umbMacroHolder"&gt;&lt;!-- startUmbMacro --&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;a href="/blog/test-post.aspx"&gt;Test Post&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;!-- endUmbMacro --&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I'll update this post again once I've retrieved the XML from the Database (if that's helpful). The issue is less the actual data as it is the disconnect between the published page and the back end.</p>