1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3 <!-- Magic sauce copied from a manual. This fragment basically
4 copies everything except for stuff that explicitly matches with
5 the templates defined below. In the case of such a match, the
6 matched node is treated differently.-->
7 <xsl:template match="@* | node()">
9 <xsl:apply-templates select="@* | node()"/>
12 <!-- End of magic sauce -->
14 <!-- Read in the value of the argument. -->
15 <xsl:variable name="max-link-kbps" select="//RSpec//target-context/argument[name='max-link-kbps']/value"/>
17 <!-- Modify LinkSpecs for which kbps > max-link-kbps -->
18 <xsl:template match="vlink/kbps">
20 <xsl:when test=". > $max-link-kbps">
21 <kbps><xsl:value-of select="$max-link-kbps"/></kbps>
24 <xsl:copy-of select="."/>
29 <!-- Fill in missing kbps values -->
30 <xsl:template match="vlink[not(kbps)]">
32 <xsl:copy-of select="@* | *"/>
33 <kbps><xsl:value-of select="$max-link-kbps"/></kbps>
37 <xsl:template match="sfatables-input"/>