WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Center > Breakroom (General: Any Topic)
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Breakroom (General: Any Topic) Here's the place to talk about anything and everything. What's discussed is up to you!

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-03-2007, 04:09 PM
kgun's Avatar
kgun kgun is offline
WebProWorld 1,000+ Club
 

Join Date: May 2005
Location: Norway
Posts: 4,696
kgun RepRank 3kgun RepRank 3
Default Smilies turned on, is this code fine?

<?xml version="1.0"?>
<xsl:stylesheet xmlnssl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xslaram name="sortparam" select="datetime" />
<xslutput method="html"/>

<xsl:template match="/">
<table>
<xsl:apply-templates select="//channel/item">
<xsl:sort select="../title[$sortparam='channel']" order="ascending" />
<xsl:sort select="./title[$sortparam='title']" order="ascending"
case-order="lower-first" />
<xsl:sort select="./timestamp" order="descending" />
</xsl:apply-templates>
</table>
</xsl:template>

<xsl:template match="channel">
<xsl:element name="channel">
<xsl:copy-of select="title" />
<xsl:copy-of select="link" />
<xsl:apply-templates select="item"/>
</xsl:element>
</xsl:template>

<xsl:template match="item">
<tr>
<td colspan="3">
<a>
<xsl:attribute name="href">
<xsl:value-of select="link" />
</xsl:attribute>
<xsl:value-of select="title"/>
</a>
</td>
</tr><tr>
<!-- Insert some non breaking spaces.
Rather than add DTD for nbsp numeric codes are used instead. -->
<td>*****</td>
<td>Channel:
<a>
<xsl:attribute name="href">
<xsl:value-of select="../link" />
</xsl:attribute>
<xsl:value-of select="../title"/>
</a>
</td>
<td>Published: <xsl:copy-of select="pubDate" /></td>
</tr>
</xsl:template>

</xsl:stylesheet>

Conclusion: No it is not.

The 2,3 and fourth line should be:

<xsl:stylesheet xmlns : xsl="XSLT namespace" version="1.0">
<xsl : param name="sortparam" select="datetime" />
<xsl : output method="html"/>

Where I have inserted a space before and after the : with the smilies.

Final conclusion, if you want to write XML and similar code in your posts, you should turn off smilies permanently.

Last edited by kgun : 06-03-2007 at 04:23 PM.
Reply With Quote
  #2 (permalink)  
Old 06-03-2007, 07:31 PM
Webnauts's Avatar
Webnauts Webnauts is offline
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Worldwide
Posts: 6,987
Webnauts RepRank 3Webnauts RepRank 3
Default Re: Smilies turned on, is this code fine?

What about the wrap code button in the advanced editor (wysiwyg)?
Reply With Quote
  #3 (permalink)  
Old 06-04-2007, 06:42 AM
kgun's Avatar
kgun kgun is offline
WebProWorld 1,000+ Club
 

Join Date: May 2005
Location: Norway
Posts: 4,696
kgun RepRank 3kgun RepRank 3
Default Re: Smilies turned on, is this code fine?

Like this?

Code:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="XSLT namespace" version="1.0">
   <xsl:param name="sortparam" select="datetime" />
   <xsl:output method="html"/>
   <xsl:template match="/">
      <table>
         <xsl:apply-templates select="//channel/item">
            <xsl:sort select="../title[$sortparam='channel']" order="ascending" />
            <xsl:sort select="./title[$sortparam='title']" order="ascending"
                      case-order="lower-first" />
            <xsl:sort select="./timestamp" order="descending" />
         </xsl:apply-templates>
      </table>
   </xsl:template>
   <xsl:template match="channel">
      <xsl:element name="channel">
         <xsl:copy-of select="title" />
         <xsl:copy-of select="link" />
         <xsl:apply-templates select="item"/>
      </xsl:element>
   </xsl:template>
   <xsl:template match="item">
      <tr>
         <td colspan="3">
            <a>
               <xsl:attribute name="href">
                  <xsl:value-of select="link" />
               </xsl:attribute>
               <xsl:value-of select="title"/>
            </a>
         </td>
      </tr><tr>
         <!-- Insert some non breaking spaces. 
              Rather than add DTD for nbsp numeric codes are used instead. -->
         <td>     </td>
         <td>Channel: 
            <a>
               <xsl:attribute name="href">
                  <xsl:value-of select="../link" />
               </xsl:attribute>
               <xsl:value-of select="../title"/>
            </a>
         </td>
         <td>Published: <xsl:copy-of select="pubDate" /></td>
      </tr>
   </xsl:template>
</xsl:stylesheet>
That option is not much used at WPW, but at the SitePoint forums it is used as a rule and not as an exception. I agree with you John, it should also be used here.

Last edited by kgun : 06-04-2007 at 06:47 AM.
Reply With Quote
  #4 (permalink)  
Old 06-04-2007, 10:46 AM
Webnauts's Avatar
Webnauts Webnauts is offline
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Worldwide
Posts: 6,987
Webnauts RepRank 3Webnauts RepRank 3
Default Re: Smilies turned on, is this code fine?

You got it Kgun,
Reply With Quote
  #5 (permalink)  
Old 06-04-2007, 12:25 PM
Chris Chris is offline
WebProWorld MVP
WebProWorld MVP
 

Join Date: Jul 2003
Location: KCMO
Posts: 1,110
Chris RepRank 4Chris RepRank 4Chris RepRank 4
Default Re: Smilies turned on, is this code fine?

i don't understand the context here. is kjell saying all code should appear in the code box? or should all smilies be turned off? if it's about the code box, then yes, i agree... as for the smilies, they seem to be going over very well.
__________________
Former WebProWorld Admin
Reply With Quote
  #6 (permalink)  
Old 06-04-2007, 02:47 PM
dharrison's Avatar
dharrison dharrison is offline
Moderator
WebProWorld Moderator
 

Join Date: May 2005
Location: Essex, UK
Posts: 1,394
dharrison RepRank 3dharrison RepRank 3
Default Re: Smilies turned on, is this code fine?

Yeah

God I love that one!
__________________
Deb Harrison
DVH Design
Essex Web Design | Web Design Blog
Reply With Quote
  #7 (permalink)  
Old 06-04-2007, 03:49 PM
kgun's Avatar
kgun kgun is offline
WebProWorld 1,000+ Club
 

Join Date: May 2005
Location: Norway
Posts: 4,696
kgun RepRank 3kgun RepRank 3
Default Re: Smilies turned on, is this code fine?

Quote:
Originally Posted by Chris View Post
i don't understand the context here. is kjell saying all code should appear in the code box? or should all smilies be turned off? if it's about the code box, then yes, i agree... as for the smilies, they seem to be going over very well.
I did not say that originally. But after John posted his anwer, preferrably, all general code, should be in the code box (#) and all PHP (php), and HTML (< >) treated similarily. Moderators should like John did, urge members to do it correctly from the start IMO.

That can avoid misunderstandings, and generally, makes the post more foccused, again IMO.
Reply With Quote
  #8 (permalink)  
Old 06-04-2007, 03:55 PM
Chris Chris is offline
WebProWorld MVP
WebProWorld MVP
 

Join Date: Jul 2003
Location: KCMO
Posts: 1,110
Chris RepRank 4Chris RepRank 4Chris RepRank 4
Default Re: Smilies turned on, is this code fine?

i agree with using the code box kgun but that doesn't mean every poster here knows about it or that they will use it if they do know... mods are certainly welcome to clean up posts that don't use the code box, but i'm not going to issue some kind of edict about it either.
__________________
Former WebProWorld Admin
Reply With Quote
Reply

  WebProWorld > Center > Breakroom (General: Any Topic)
Tags: code, fine, smilies, turned



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is html turned off? C French WebProWorld: Guidelines/Announcements/Suggestions 1 05-02-2005 05:36 PM
Giant Smilies WPW_Feedbot Graphics & Design Discussion Forum 0 02-11-2005 12:31 AM
Designers turned SEOs -vrs- Programmers turned SEOs? ~0 Search Engine Optimization Forum 5 10-26-2004 12:04 PM
FINE ART CAS Marketing Strategies Discussion Forum 5 06-11-2004 02:11 PM
Seeking Link Exchange for Icon, Smilies, Avatar related site Larke Marketing Strategies Discussion Forum 0 04-14-2004 12:15 AM


Search Engine Friendly URLs by vBSEO 3.0.0