Skip to content

Instantly share code, notes, and snippets.

@xpathr
xpathr / utility.xsl
Created May 10, 2012 14:42
Vimeo Embed by rainerborene
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Name: Vimeo Embed
Version: 1.0
Author: Rainer Borene <rainerborene@gmail.com>
URL: http://www.symphony-cms.com/download/xslt-utilities/view/34817/
Parameters:
@xpathr
xpathr / utility.xsl
Created May 10, 2012 14:42
Video JS by iwyg
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template name="videojs">
<xsl:param name="videoWidth"/>
<xsl:param name="videoHeight"/>
<xsl:param name="posterSource"/>
@xpathr
xpathr / utility.xsl
Created May 10, 2012 14:42
Video Embed by bzerangue
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
<!--
TO USE TEMPLATE, CALL TEMPLATE LIKE SO...
<xsl:call-template name="video-media">
<xsl:with-param name="width" select="640"/>
@xpathr
xpathr / utility.xsl
Created May 10, 2012 14:42
Url-encode by Cremol
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
ISO-8859-1 based URL-encoding demo
Written by Mike J. Brown, mike@skew.org.
Updated 2002-05-20.
No license; use freely, but credit me if reproducing in print.
@xpathr
xpathr / utility.xsl
Created May 10, 2012 14:42
URL by kanduvisla
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Get the URL of a page, according to a given ID.
Example usage:
<xsl:call-template name="url">
<xsl:with-param name="id" select="35" />
@xpathr
xpathr / utility.xsl
Created May 10, 2012 14:42
Upper- and lowercase by kanduvisla
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Examples:
<xsl:call-template name="uppercase">
<xsl:with-param name="value" select="'This text will be uppercase.'" />
</xsl:call-template>
@xpathr
xpathr / utility.xsl
Created May 10, 2012 14:42
UK Counties list by nickdunn
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="uk-counties">
<countries name="United Kingdom">
<country name="England">
<county>Bedfordshire</county>
<county>Berkshire</county>
@xpathr
xpathr / utility.xsl
Created May 10, 2012 14:42
Twitter Date Formatter by wtdtan
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
<xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
<!--
Description:
This is a date formatting utility for Twitter feeds, modified from the original date-time.xsl file. The named template "twitter-format-date" takes 2 parameters:
@xpathr
xpathr / utility.xsl
Created May 10, 2012 14:42
Twitter Button Utility by bzerangue
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Twitter Button: XSL Utility
Created by Brian Zerangue on 2011-08-31.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="twitter-button">
@xpathr
xpathr / utility.xsl
Created May 10, 2012 14:42
Twitpic by rainerborene
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
xmlns:str="http://exslt.org/strings"
exclude-result-prefixes="exsl str">
<xsl:template name="twitpic">
<xsl:param name="tweet"/>
<xsl:if test="contains(tweet, 'http://twitpic.com/')">