Hi
I have a UDT which I'm formatting with a user-specific transformation (XSL shown below) I have a field (Lists) in each record which describes the tabs in which I wish to display that entry, so, the Lists field may be "FPT" meaning that this record should be displayed on tabs F and P and T. Knowing nothing of XSL, I really need some help in setting up a filter to select only those records with say "P" in the Lists field (like SQL "SELECT * FROM UDT WHERE Lists LIKE '%P%'").
Can anyone help, please?
Regards
Rae MacLeman
---------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:udt="DotNetNuke/UserDefinedTable">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
<!--
This prefix is used to generate module specific query strings
Each querystring or form value that starts with udt_{ModuleId}_param
will be added as parameter starting with param
-->
<xsl:variable name="prefix_param">udt_<xsl:value-of select="//udt:Context/udt:ModuleId" />_param</xsl:variable>
<xsl:template match="udt:Data" mode="list">
<tr class="normal">
<td>
</td>
<td>
<xsl:call-template name="EditLink" />
</td>
</tr>
<tr class="normal">
<td>
<xsl:value-of select="udt:Image" disable-output-escaping="yes" />
</td>
<td>
</td>
</tr>
<tr class="normal">
<td>
</td>
<td>
<xsl:value-of select="udt:Company_x0020_Name" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td>
</td>
<td>
<xsl:value-of select="udt:Business_x0020_Sector" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Training Locations</td>
<td>
<xsl:value-of select="udt:Training_x0020_Locations" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">List</td>
<td>
<xsl:value-of select="udt:Lists" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Undergraduate Vacation Placements</td>
<td>
<xsl:value-of select="udt:Undergraduate_x0020_Vacation_x0020_Placements" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Undergraduate 12 mth Placements</td>
<td>
<xsl:value-of select="udt:Undergraduate_x0020_12_x0020_mth_x0020_Placements" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Undergraduate Sponsorships</td>
<td>
<xsl:value-of select="udt:Undergraduate_x0020_Sponsorships" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Bursary Level</td>
<td>
<xsl:value-of select="udt:Bursary_x0020_Level" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Application Years</td>
<td>
<xsl:value-of select="udt:Application_x0020_Years" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Placement or sponsored course subjects</td>
<td>
<xsl:value-of select="udt:Placement_x0020_or_x0020_sponsored_x0020_course_x0020_subjects" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Graduate Vacancies</td>
<td>
<xsl:value-of select="udt:Graduate_x0020_Vacancies" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Postgraduate bursary</td>
<td>
<xsl:value-of select="udt:Postgraduate_x0020_bursary" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Expected Professional Qualifications</td>
<td>
<xsl:value-of select="udt:Expected_x0020_Professional_x0020_Qualifications" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Preferred Universities</td>
<td>
<xsl:value-of select="udt:Preferred_x0020_Universities" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Other relevant information</td>
<td>
<xsl:value-of select="udt:Other_x0020_relevant_x0020_information" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Contact</td>
<td>
<xsl:value-of select="udt:Contact" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Address</td>
<td>
<xsl:value-of select="udt:Address" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Website</td>
<td>
<xsl:value-of select="udt:Website" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Email</td>
<td>
<xsl:value-of select="udt:Email" disable-output-escaping="yes" />
</td>
</tr>
<tr class="normal">
<td align="right">Company Description</td>
<td>
<xsl:value-of select="udt:Company_x0020_Description_x002F_Activities" disable-output-escaping="yes" />
</td>
</tr>
</xsl:template>
<xsl:template match="/udt:UserDefinedTable">
<xsl:variable name="currentData" select="udt:Data" />
<table>
<xsl:apply-templates select="$currentData" mode="list">
</xsl:apply-templates>
</table>
</xsl:template>
<xsl:template name="EditLink">
<xsl:if test="udt:EditLink">
<a href="{udt:EditLink}">
<img border="0" alt="edit" src="{//udt:Context/udt:ApplicationPath}/images/edit.gif" />
</a>
</xsl:if>
</xsl:template>
</xsl:stylesheet>