Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

DotNetNuke Marketplace
  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  User Defined Ta...  Help with XSL filter, please?
Previous Previous
 
Next Next
New Post 5/12/2008 2:42 PM
User is offline Rae MacLeman
17 posts
10th Ranked


Help with XSL filter, please? 

 

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>

 
New Post 5/13/2008 2:03 AM
User is offline Stefan Cullmann
1551 posts
5th Ranked








Re: Help with XSL filter, please? 

....

 <xsl:template match="/udt:UserDefinedTable">
    <xsl:variable name="currentData" select="udt:Data[contains(udt:Lists,'P')]" />
    <table>
      <xsl:apply-templates select="$currentData" mode="list">
      </xsl:apply-templates>
    </table>
  </xsl:template>

....

 


Stefan Cullmann - stefan.cullmann [at] dotnetnuke.com
form and List will be the successor of the User Defined Table module.
----------------------------------------------------------------------
Do you want to import external data to form and List /User Defined Table?
Check out http://www.codeplex.com/Csv2UDTImport
 
New Post 5/13/2008 5:50 AM
User is offline Rae MacLeman
17 posts
10th Ranked


Re: Help with XSL filter, please? 

Stefan,

Thank you - this solution works like a charm!

Kind regards
Rae MacLeman

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  User Defined Ta...  Help with XSL filter, please?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


CrystalTech
CrystalTech Web Hosting™ provides first-class service and support. Our value-packed ASP.NET plans offer DNN installation, SQL 2005 and up to 100 domain names starting at only $16.95 per month!
CrystalTech.com
DotNetNuke® in Sweden
All service of DotNetNuke® in Sweden.
Olsmar Konsult
DocuPeak Business Process Management RAD
Comprehensive enterprise and government process management. Forms, documents, indexing, workflow, views, content intelligence, capture, etc. Point and click rapid application development.
www.Webiplex.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP