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>
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:
xmlns:CWS.Twitter="urn:CWS.Twitter"
And in the exclude=result-prefixes:
CWS.Twitter
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.
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.
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.
Error parsing XSLT file
Hi Warren,
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:
The XML that is feched from Twitter:
Any help will be much appriciated!
Ron
Hi Ron,
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.
I.e. replace:
with:
And then add the following xsl:template
Cheers,
Chris
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.
Ron
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.
Warren
Thanks Warren,
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.
Ron
Glad you got it fixed :)
Hi Warren,
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!
Ron
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.
Warren
is working on a reply...