Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Does this do what you want?</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"&gt; &lt;xsl:template match="/"&gt; &lt;output&gt; &lt;xsl:apply-templates select="//log | //result"&gt; &lt;xsl:sort select="@numerictimestamp"/&gt; &lt;/xsl:apply-templates&gt; &lt;/output&gt; &lt;/xsl:template&gt; &lt;xsl:template match="log | result"&gt; &lt;xsl:copy-of select="."/&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>I think that you were correct that the for-each was reducing the scope to just the current item</p> <p>The other thing that is happening is the converting your numerictimestamp attributes to numbers is causing rounding.</p> <p>If I do this:</p> <pre><code>&lt;xsl:template match="log | result"&gt; &lt;entry&gt; &lt;number&gt;&lt;xsl:value-of select="number(@numerictimestamp)"/&gt;&lt;/number&gt; &lt;string&gt;&lt;xsl:value-of select="@numerictimestamp"/&gt;&lt;/string&gt; &lt;/entry&gt; &lt;/xsl:template&gt; </code></pre> <p>I see this:</p> <pre><code>&lt;entry&gt; &lt;number&gt;20120123170428132&lt;/number&gt; &lt;string&gt;20120123170428133&lt;/string&gt; &lt;/entry&gt; &lt;entry&gt; &lt;number&gt;20120123170428352&lt;/number&gt; &lt;string&gt;20120123170428353&lt;/string&gt; &lt;/entry&gt; &lt;entry&gt; &lt;number&gt;20120123170428352&lt;/number&gt; &lt;string&gt;20120123170428352&lt;/string&gt; &lt;/entry&gt; </code></pre> <p>As I understand things, the XSLT number data type is according to IEEE 754 and wikipedia tells me that double precision is accurate to 15.95 digits. Your numbers are 17 digits</p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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