Title: Using XSL shortcode
Last modified: August 22, 2016

---

# Using XSL shortcode

 *  [rzharding](https://wordpress.org/support/users/rzharding/)
 * (@rzharding)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/using-xsl-shortcode/)
 * Victor,
 * I have discovered your SQL Shortcode plugin. It is a very useful plugin. Thank
   you.
 * I am attempting to duplicate the USER table example that you supplied.
 * The USER table is returned correctly with the [SQL] shortcode.
 * [sql]
    SELECT ID, display_name, user_login, user_registered, “*******@*******.
   com” as user_email FROM wp_users [/sql]
 * —————————————————
 * However, I cannot format the table using the [xsl] shortcode as shown in your
   example.
 * Instead of the formatted USER table, I end up with the result:
 * =====================================================================
    <table
   > <xsl:copy-of select=”/table/tr[1]” /> <xsl:for-each select=”/table/tr[position()!
   = 1]”> <tr> <xsl:for-each select=”td”> <xsl:choose> <xsl:when test=”position()
   = 5?> <td>[<xsl:value-of select=”.” />](https://wordpress.org/support/topic/using-xsl-shortcode/{text()}?output_format=md)
   </td> </xsl:when> <xsl:otherwise> <xsl:copy-of select=”.” /> </xsl:otherwise>
   </xsl:choose> </xsl:for-each> </tr> </xsl:for-each> </table> ================
   ======================================================
 * I wish to be able to return a table with a column containing links to lookup 
   items in another table.
 * I would appreciate it if you could assist.
 * Richard Harding
 * [https://wordpress.org/plugins/sql-shortcode/](https://wordpress.org/plugins/sql-shortcode/)

The topic ‘Using XSL shortcode’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sql-shortcode.svg)
 * [SQL Shortcode](https://wordpress.org/plugins/sql-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/sql-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/sql-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sql-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sql-shortcode/reviews/)

## Tags

 * [sql-query](https://wordpress.org/support/topic-tag/sql-query/)

 * 0 replies
 * 1 participant
 * Last reply from: [rzharding](https://wordpress.org/support/users/rzharding/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/using-xsl-shortcode/)
 * Status: not resolved