Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Connie DeCinko 931 posts 1160 karma points
    Apr 24, 2013 @ 21:29
    Connie DeCinko
    0

    Support for Atom Threading Extensions?

    In my Atom (Typepad) RSS feed, there is a count of the number of comments to the blog article. It is thr:count in the link tag.

    <link rel="replies" type="text/html" href="http://thecareerist.typepad.com/thecareerist/2013/04/law-school-news-sp-ratings-ny-lw-schools-arizona-tuition.html" thr:count="0" />
    Any idea how to access that value?  I've tried the following in my XSLT but am getting an error:
    <xsl:value-of select="atom:link[@rel='replies']/@thr:count"/>
    
    
                    
  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Apr 24, 2013 @ 21:38
    Lee Kelleher
    1

    Hi Connie,

    Do you know the namespace URI of the "thr" prefix? You'll need to reference that in the top of your XSLT, then you can use it in your XPath expressions.

    Cheers, Lee.

  • Connie DeCinko 931 posts 1160 karma points
    Apr 24, 2013 @ 21:47
    Connie DeCinko
    0

    I have xmlns:atom=http://www.w3.org/2005/Atom which gives me all the basic references.  I have to add another one for the threading extensions?

     

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Apr 24, 2013 @ 21:54
    Lee Kelleher
    100

    Yup - gotta love how verbose XSLT is! ;-)

    I did a quick google for the namespace URI, you'll need to add this to the top of your XSLT namespaces:

    xmlns:thr="http://purl.org/syndication/thread/1.0"

    Cheers, Lee.

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Apr 24, 2013 @ 21:56
    Chriztian Steinmeier
    0

    Hi Connie,

    As Lee says, you'll need the Namespace-URI assigned to that prefix - it'll look like the atom one, e.g.: xmlns:thr="http://xxx.yyy.zzz"

    You'll need to add it to the stylesheet to properly select the attribute.

    /Chriztian

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Apr 24, 2013 @ 22:00
    Chriztian Steinmeier
    1

    OK - y'all got that sorted out :-)

    — Don't think of it as verbosity - it's just like using a @using statement in C# so you don't have to say something like Int32 borderWidthSystem.Web.UI.WebControls.Unit.Pixel(2) :-)

    /Chriztian

  • Connie DeCinko 931 posts 1160 karma points
    Apr 24, 2013 @ 22:02
    Connie DeCinko
    0

    Done.  Once I correctly formatted the value, works like a charm!

    <xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:umbraco.library="urn:umbraco.library"
      exclude-result-prefixes="msxml umbraco.library"
      xmlns:atom="http://www.w3.org/2005/Atom"
      xmlns:thr="http://purl.org/syndication/thread/1.0">

    . . .

    <xsl:value-of select="atom:link[@rel='replies']/@thr:count"/>

Please Sign in or register to post replies

Write your reply to:

Draft