Note that there are some explanatory texts on larger screens.

plurals
  1. POxslt with html table sort specific td
    text
    copied!<p>I'm new at XSLT language so i don't now how to do that..i want to sort all rows by category from table except the count products..i don't want to affect the order off count_products..please help..the code i have made so far</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;xsl:output method="html"/&gt; &lt;xsl:template match="/"&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;link rel="stylesheet" href="css/xsl_style.css" type="text/css"/&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="tableStyle" &gt; &lt;table&gt; &lt;tr bgcolor="#B5E4EA"&gt; &lt;td&gt;A/A&lt;/td&gt; &lt;td&gt;Product Name&lt;/td&gt; &lt;td&gt;Price&lt;/td&gt; &lt;td&gt;Corpration&lt;/td&gt; &lt;td&gt;Category&lt;/td&gt; &lt;/tr&gt; &lt;xsl:for-each select="auction_products/product"&gt; &lt;xsl:sort select="category"/&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="live_auctions.php"&gt;&lt;xsl:value-of select="count_products"/&gt;&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;a href="live_auctions.php"&gt;&lt;xsl:value-of select="product_name"/&gt;&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;a href="live_auctions.php"&gt;&lt;xsl:value-of select="price"/&gt;&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;a href="live_auctions.php"&gt;&lt;xsl:value-of select="corporation"/&gt;&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;a href="live_auctions.php"&gt;&lt;xsl:value-of select="category"/&gt;&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/xsl:for-each&gt; &lt;/table&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre>
 

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