Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You need to create a rule to match "/" or XSL will implicitly generate one for you based on a to-text conversion of the document tree.</p> <p>I would rewrite the XSL to this:</p> <pre><code>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aws="http://webservices.amazon.com/AWSECommerceService/2006-06-07"&gt; &lt;xsl:output method="html" encoding="UTF-8" omit-xml-declaration="yes"/&gt; &lt;xsl:template match="/"&gt; &lt;html&gt; &lt;head&gt;...&lt;/head&gt; &lt;body&gt; &lt;table&gt; &lt;thead&gt;...&lt;/thead&gt; &lt;tbody&gt; &lt;xsl:apply-templates select="//aws:Item"/&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/body&gt; &lt;/html&gt; &lt;/xsl:template&gt; &lt;xsl:template match="aws:Item"&gt; &lt;tr&gt; &lt;td&gt;...&lt;/td&gt; &lt;/tr&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>OR add this template to your existing xsl</p> <pre><code>&lt;xsl:template match="*|@*"&gt; &lt;xsl:apply-templates select="*|@*"/&gt; &lt;/xsl:template&gt; </code></pre> <p>Both templates would match document root ("/") which is the ONLY implicit match that XSL does. This first would make "/" map to the html tag which would create a table in which each table row maps to aws:item. The second would match all nodes (and attributes), output nothing, and then attempt to match all children. The first is better if you only want to process aws:Item, the second is better if you want to process all nodes. The second may (depending on the optimization features of you xslt processor and your particular xslt document) take much longer to process.</p>
 

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