Skip to content

Instantly share code, notes, and snippets.

@michmy
michmy / Simply Styled Heading
Last active January 5, 2017 14:10
html + css
<style>
body {
font-family: 'Open Sans', sans-serif;
font-weight: 400;
color: #6b7770;
font-size: 11.5pt;
line-height: 2em;
}
@michmy
michmy / globalReplace
Created March 11, 2014 18:27
This template will truncate a phrase at a maximum length, with the option to truncate on a word boundary
<!-- http://aaronland.info/xsl/string/truncate-phrase -->
<!-- This template will truncate a phrase at a maximum length, with the option to truncate on a word boundary -->
<xsl:template name="globalReplace">
<xsl:param name="outputString"/>
<xsl:param name="target"/>
<xsl:param name="replacement"/>
<xsl:choose>
<xsl:when test="contains($outputString,$target)">
<xsl:value-of select="concat(substring-before($outputString,$target),$replacement)"/>
<xsl:call-template name="globalReplace">