Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
First of all I love this package!However at the moment (it did work and no errors occurred) it is causing the well known "Error parsing XSLT file". And I can't find the problem, I know it goes wrong when using CWS.Twitter:, because when I just read directly from xml it works.
The template that I use:
<xsl:template match="status" mode="tweet"> <!-- Change the XHTML here for how you want each tweet to be displayed --> <div class="block-content"> <p> <xsl:value-of select="CWS.Twitter:FormatURLS(text)" disable-output-escaping="yes"/> </p> <small class="note"> <xsl:value-of select="umbraco.library:FormatDateTime(CWS.Twitter:FormatTwitterDate(created_at), 'ddd d MMM yy @ H:mm')"/> from <xsl:value-of select="source" disable-output-escaping="yes"/> </small> </div> </xsl:template>
The XML that is feched from Twitter:
<statuses type="array"> <status> <created_at>Mon Nov 16 18:06:18 +0000 2009</created_at> <id>5771338288</id> <text>Morgen 17/11 partnervergadering in Convention Factory met info over (promo) activiteiten in 2009 en 2010 en profiteer van Giro en Sail</text> <source>web</source> <truncated>false</truncated> <in_reply_to_status_id /> <in_reply_to_user_id /> <favorited>false</favorited> <in_reply_to_screen_name /> <user> <id>40857056</id> <name>VVV Amsterdam</name> <screen_name>ATCB</screen_name> <location>Amsterdam</location> <description /> <profile_image_url>http://a1.twimg.com/profile_images/442561770/woordmerk_NL2_normal</profile_image_url>; <url>http://www.iamsterdam.com/visiting</url>; <protected>false</protected> <followers_count>80</followers_count> <profile_background_color>709397</profile_background_color> <profile_text_color>333333</profile_text_color> <profile_link_color>FF3300</profile_link_color> <profile_sidebar_fill_color>A0C5C7</profile_sidebar_fill_color> <profile_sidebar_border_color>86A4A6</profile_sidebar_border_color> <friends_count>1</friends_count> <created_at>Mon May 18 11:40:36 +0000 2009</created_at> <favourites_count>0</favourites_count> <utc_offset>3600</utc_offset> <time_zone>Amsterdam</time_zone> <profile_background_image_url>http://s.twimg.com/a/1258070043/images/themes/theme6/bg.gif</profile_background_image_url>; <profile_background_tile>false</profile_background_tile> <statuses_count>96</statuses_count> <notifications /> <geo_enabled>false</geo_enabled> <verified>false</verified> <following /> </user> <geo /> </status></statuses>
Any help will be much appriciated!
If I understood you correctly this did work and has just stopped working?
So it's likely to be something different with the current XML received from twitter, have you tried breaking the XSLT down so that it only calls one of Warren's XSLT extensions to see if you only get the error with one of them?
I assume you have following in the xsl:stylesheet:
And in the exclude=result-prefixes:
I have currently replaced Warren's function call FormatURLS with the following XSLT template, we are currently working on a new version that will include this within the function, but for now you might wish to do the same.
<xsl:value-of select="CWS.Twitter:FormatURLS(text)" disable-output-escaping="yes"/>
<xsl:call-template name="formaturl"> <xsl:with-param name="url" select="text"/></xsl:call-template>
And then add the following xsl:template
<xsl:template name="formaturl"> <xsl:param name="url"/> <xsl:variable name="transform-http" select="Exslt.ExsltRegularExpressions:replace($url, '(http\:\/\/\S+)',ig,'<a href="$1">$1</a>')"/> <xsl:variable name="transform-https" select="Exslt.ExsltRegularExpressions:replace($transform-http, '(HTTps\:\/\/\S+)',ig,'<a href="$1">$1</a>')"/> <xsl:variable name="transform-AT" select="Exslt.ExsltRegularExpressions:replace($transform-https, '(^|\s)@(\w+)',ig,' <a href="http://www.twitter.com/$2">@$2</a>')"/> <xsl:variable name="transform-HASH" select="Exslt.ExsltRegularExpressions:replace($transform-AT, '(^|\s)#(\w+)',ig,' <a href="http://www.twitter.com/search?q=$2">#$2</a>')"/> <xsl:value-of select="$transform-HASH" disable-output-escaping="yes"/> </xsl:template>
Thanks for helping out!
It seems that the xml that is show above won't work for some reason.There is no problem when saving the template so all extensions are correct.However using FormatURLS or FormatTwitterDate causes the problem.I've replaced the FormatURLS like you suggested but it doesn't make any difference.
Hiya Ron,Is the DLL definately been copied over and along with the config file updated?
A quick way to test is to use the built in XSLT editor.
Have you tried without fomatting the date, to see if that is the problem.
I just found the problem. One of my colleagues was so good to override the xsltExtensions.config.
I find it odd though. I never received an error from Umbraco, which it normally does whenever an extension is missing.
Glad you got it fixed :)
Just used your extensions only in a different xslt for a client to correctly display a twitter list of all employees working at that company.The xsl and xml is different but it works just fine!
Yeh with it being XML that the beneift of having XSLT to display what data you want back from the XML. But obviously the common one is to show your most recent tweets.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted