- <xsl:variable name="item-content" select=".//div[contains(@class, 'userContent')]"/>
- <xsl:variable name="item-permalink" select="concat($BaseURL, .//a[@target='']/@href)"/>
+ <xsl:variable name="story-id" select=".//input[@name='ft_ent_identifier']/@value"/>
+ <xsl:variable
+ name="item-permalink"
+ select="concat($BaseURL, '/permalink.php?id=', $page-id, '&story_fbid=', $story-id)"/>
+
+ <!-- Get only the first child in order to skip the footer of the content -->
+ <xsl:variable name="item-content" select="div[1]"/>
+