title: How to query an attribute on an existing XSLT-FO output node
body: <p>I am trying to create PDFs from HTML. I want to keep  contents together on rows that do not contain child tables. I have located the appropriate rows but nothing happens, so I logged the output as follows:</p>
  
  <pre><code>  &lt;xsl:template match="tr"&gt;
      &lt;fo:table-row"&gt;
        &lt;xsl:if test="count(descendant::table) = 0"&gt;
            &lt;xsl:attribute name="keep-together"&gt;  
              &lt;xsl:value-of select="always"/&gt;  
            &lt;/xsl:attribute&gt;
         &lt;/xsl:if&gt;
        &lt;xsl:message&gt;
          keep-together = &lt;xsl:value-of select="./@keep-together"/&gt;
        &lt;/xsl:message&gt;
  </code></pre>
  
  <p>For each row in the doc, the FOP logging says:</p>
  
  <pre><code>keep-together = 
  </code></pre>
  
  <p>So, I tried:</p>
  
  <pre><code>&lt;xsl:template match="tr"&gt;
    &lt;fo:table-row keep-together="always"&gt;
      &lt;xsl:message&gt;
        keep-together = &lt;xsl:value-of select="./@keep-together"/&gt;
      &lt;/xsl:message&gt;
  </code></pre>
  
  <p>This makes jibberish of the output with the nested tables, but in the logging for each table-row it still says:</p>
  
  <pre><code>keep-together = 
  </code></pre>
  
  <p>So, how does one get the value of a newly-created attribute on a newly-created FO output node?</p>