1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
4 <xsl:template match="text()"/>
6 <xsl:template match="$include">
8 <xsl:apply-templates select="node()|@*" mode="remove"/>
12 <xsl:template match="node()|@*" mode="remove">
14 <xsl:apply-templates select="node()|@*" mode="remove"/>
19 <xsl:template match="$exclude" mode="remove"/>
22 <!-- attempt to replace relative URLs with absolute URLs -->
23 <!-- http://stackoverflow.com/questions/3824631/replace-href-value-in-anchor-tags-of-html-using-xslt -->
25 <xsl:template match="*/@src[starts-with(.,'.')]" mode="remove">
26 <xsl:attribute name="src">
27 <xsl:value-of select="concat('$dirurl',.)"/>
30 <xsl:template match="*/@src[starts-with(.,'/')]" mode="remove">
31 <xsl:attribute name="src">
32 <xsl:value-of select="concat('$rooturl',.)"/>