Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2012
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="1.0"
  3. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4. xmlns:atom="http://www.w3.org/2005/Atom">
  5.  
  6. <xsl:include href="../utilities/master.xsl"/>
  7.  
  8. <xsl:template match="data">
  9. <xsl:apply-templates select="blog-entry/entry"/>
  10.  
  11. <div id="flickr-list">
  12. <ul>
  13. <xsl:apply-templates select="flickr//atom:entry"/>
  14. </ul>
  15. </div>
  16. </xsl:template>
  17.  
  18. <xsl:template match="blog-entry/entry">
  19. <div id="blog-entry" class="content">
  20. <h2><xsl:value-of select="title"/></h2>
  21. <ul class="meta">
  22.  
  23. <li class="date">
  24. <xsl:call-template name="format-date">
  25. <xsl:with-param name="date" select="date"/>
  26. <xsl:with-param name="format" select="'x M Y'"/>
  27. </xsl:call-template>
  28. </li>
  29.  
  30. </ul>
  31. <xsl:copy-of select="content/node()"/>
  32. </div>
  33. </xsl:template>
  34.  
  35. <xsl:template match="flickr//atom:entry">
  36. <li>
  37. <a><xsl:attribute name="href">
  38. <xsl:value-of select="atom:link/@href"/>
  39. </xsl:attribute>
  40. <img width="800px"><xsl:attribute name="src">
  41. <xsl:value-of select="atom:link[position() = 2]/@href"/>
  42. </xsl:attribute></img>
  43. </a>
  44. </li>
  45. </xsl:template>
  46.  
  47. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement