Tags Cloud
This is an open discussion with 3 replies, filed under XSLT.
Search
Great work bauhause! I came up with my own tag cloud template not so long ago, supporting similar functionality (pass a range and it will calculate sizes). One suggestion — I'd be cautious of setting font sizes directly in the XSLT. A preferred method would be to use a set of classes on the anchors so that styling is kept in external CSS files.
Out of interest, what would a uri
node look like? For the rel=tag
microformat the tag needs to be the last chunk of the URL string. Just wondering, because I'm a microformat nut ;-)
Thanks, nickdunn. I should have taken a look at previous implementations before I created mine. Your XSL looks a lot more elegant at first glance. I believe you are right about setting font sizes in external CSS instead of inline. I first wanted to match the existing functionality of WP-Cumulus so as not to require a more extensive rewrite of the ActionScript. It would be possible to apply a different XSL template, or use a different mode, for rendering the anchors in the HTML so that it is well-formed while maintaining the required format for the XML served to the SWF file.
As a side note, I did try using apply-templates
instead of call-template
for the tags
utility, but even though I was trying to match the entry
node, the output include the text value of the section
node.
<xsl:apply-templates match="data/tags/entry"/>
If anyone has any ideas about why that would happen, please let me know.
I need to learn more about microformats. I've only experimented a little with the hCalendar microformat. Moving the rel
attribute is an easy fix. Can you explain the usage of the uri
node?
Sure. The rel-tag
microformat stipulates that the last part of the URL is the tag itself, i.e. after the last forward-slash in the URL.
Therefore for the tag to be a valid microformat, the URL should look along the lines of:
http://domain.com/articles/tags/my-tag
Trailing slashes are ignored.
If that URL structure fits your site, then adding rel=tag
to the links is a valid use of the microformat. Simple as that :-)
Create an account or sign in to comment.
The Cumulus ensemble uses the following utility to manage font sizes for HTML and Flash text. Play with the $minsize and $maxsize parameters to modify sizes.