Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews FeedsNews Feed (RSS) Free Video Tutorial & XSL Transformation tutorial with filesNews Feed (RSS) Free Video Tutorial & XSL Transformation tutorial with files
Previous
 
Next
New Post
5/21/2008 4:39 PM
 

Hi Phil

Thank you very, very much!
Going over this, and "re-going" over the original feeds source, most (if not all) of this makes sense.

For a start, I never realised you could set up styling in XSL as you would in basic HTML with <style media="all" lang="en" type="text/css">.
That's a big bonus (should've remembered my html basics, I suppose).  Also seems that one has better control over styling if the elements
are sitting in divs. The examples I used didn't utilize this much.

Could you please elobarate on the variables you set and what they do, more specifically:

<xsl:variable name="link" select="link"/>
  <xsl:variable name="description" select="description"/>
  <xsl:variable name="image" select="image/url"/>
  <xsl:variable name="idesc" select="image/description"/>
  <xsl:variable name="ilink" select="image/link"/>
  <xsl:variable name="iwide" select="image/width"/>
  <xsl:variable name="ihigh" select="image/height"/>

Think this might help newbies like me to better understand what they're looking at.
Otherwise, this XSL templates make sense.  Again, thank you for this - massive help.

 


Shebang Websites - A product of Mogridge Design
Hey, we're partnered with UntangleMyWeb.com

 
New Post
5/21/2008 4:47 PM
 

P.S. For some reason, the same styling in Mozilla Firefox shows with a Channel Image at the top (underneath "Dispatch Online - News All the top News stories").
This seems easy enough to remove. Simply delete the <img src="{$image}" height="{$ihigh}" width="{$iwide}" style="float: left; margin: 2px; border: 0px;"/>.

 


Shebang Websites - A product of Mogridge Design
Hey, we're partnered with UntangleMyWeb.com

 
New Post
5/22/2008 2:19 AM
 

Off Topic: Hey Jon, I don't suppose you are from East London are you? Not often I see the Daily Dispatch News Feed on these Forums ;)


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
5/22/2008 11:59 AM
 

See my reply on next page - Changed subject Line: (For others to find more easily)

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/48/threadid/8833/scope/posts/threadpage/2/Default.aspx

Jon


Shebang Websites - A product of Mogridge Design
Hey, we're partnered with UntangleMyWeb.com

 
New Post
5/22/2008 12:01 PM
 

FOR THOSE WHO MISSED OUT ON THE FIRST PORTION OF THE THREAD,
here's the source for an awesome XSL Transformation File iWonder hooked me up with.

For newbie's like me, it's a great place to learn...

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xsl"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   xmlns:dc="http://purl.org/dc/elements/1.1/">
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
<!-- RSSv2.0 XSL stylesheet -->
<!-- Displays only 5 items and only 120 char of content:encoded text -->
<!-- 2008/05/21 By Request -->
<!-- Author: Phil 'iwonder' Guerra -->
<!-- Use with Author Attribution Please -->
<!-- ================================== -->

<xsl:template match="/">
<style media="all" lang="en" type="text/css">
.rssChannelTitle
{
 font-family:  Tahoma;
   font-size:  13pt;
 font-weight:  bold;
  text-align:  Left;
}
.rssChannelDescription
{
 font-family: Times;
   font-size: 11pt;
 font-weight: Bold;
  text-align: Left;
}
.rssItemTitle
{
 font-family:  Verdana;
   font-size:  10pt;
   font-weight: BOLD;
 font-color: #00000;
}
.rssItemDescription
{
 font-family:  Verdana;
   font-size:  10pt;
   font-weight:  Normal;
 font-color: red;
}
.rssItemPubDate
{
 font-family:  Times;
   font-size:  8pt;
   font-weight:  Normal;
 font-color: #000000;
}
</style>

<div>
  <xsl:apply-templates select="rss/channel"/>
  </div>
</xsl:template>
<xsl:template match="rss/channel">
<xsl:variable name="link" select="link"/>
  <xsl:variable name="description" select="description"/>
  <xsl:variable name="image" select="image/url"/>
  <xsl:variable name="idesc" select="image/description"/>
  <xsl:variable name="ilink" select="image/link"/>
  <xsl:variable name="iwide" select="image/width"/>
  <xsl:variable name="ihigh" select="image/height"/>

<div class="rssChannelTitle">
 <xsl:if test="$image">
    <a href="{$ilink}" title="{$idesc}"><xsl:value-of select="ilink" /></a>
    <img src="{$image}" height="{$ihigh}" width="{$iwide}" style="float: left; margin: 2px; border: 0px;"/>
 </xsl:if> 
 <a href="{$link}"><xsl:value-of select="title" /></a><br/>
 </div>
<div class="rssChannelDescription">
 <xsl:value-of select="substring(description,1,120)" disable-output-escaping="no"/><br/>
</div>
<div class="rssChannelsubHead">
 <xsl:value-of select="webMaster"/><br/>
 <xsl:value-of select="copyright"/><br/>
 <xsl:value-of select="lastBuildDate"/>
 <hr/>
</div>

  <xsl:apply-templates select="item"/>
</xsl:template>
<xsl:template match="item">
<xsl:if test="position() &lt; 6"> <!-- limit the display to 5 items -->
  <xsl:variable name="item_link" select="link"/>
  <div class="rssItemTitle">
    <a href="{$item_link}" ><xsl:value-of select="title" disable-output-escaping="yes"/></a>
</div>
<div class="rssItemPubDate">
 (<xsl:value-of select="pubDate"/>)
</div>
<div class="rssItemDescription">
 <xsl:value-of select="substring(content:encoded,4,120)" disable-output-escaping="yes"/>...<br/>
</div> <hr/>
</xsl:if> <!-- end of If statement block for limiting number of items -->
 </xsl:template>


Shebang Websites - A product of Mogridge Design
Hey, we're partnered with UntangleMyWeb.com

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews FeedsNews Feed (RSS) Free Video Tutorial & XSL Transformation tutorial with filesNews Feed (RSS) Free Video Tutorial & XSL Transformation tutorial with files


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out