1<?xml version="1.0" encoding="ISO-8859-1"?> 2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 3 4 <!-- FileName: Match12 --> 5 <!-- Document: http://www.w3.org/TR/xpath --> 6 <!-- DocVersion: 19991116 --> 7 <!-- Section: 5.4 --> 8 <!-- Creator: David Marston --> 9 <!-- Purpose: Test that apply-templates goes down at least 15 levels. --> 10 11<xsl:template match="doc"> 12 <out> 13 <xsl:value-of select="title"/><xsl:text> 14</xsl:text> 15 <xsl:apply-templates/> 16 </out> 17</xsl:template> 18 19<xsl:template match="title"/><!-- Suppress the default action on these. --> 20 21<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template> 22 23<xsl:template match="a"> 24 <xsl:text>Found an A node 25</xsl:text> 26 <xsl:apply-templates/> 27</xsl:template> 28 29<xsl:template match="b"> 30 <xsl:text>Found a B node 31</xsl:text> 32 <xsl:apply-templates/> 33</xsl:template> 34 35<xsl:template match="c"> 36 <xsl:text>Found a C node 37</xsl:text> 38 <xsl:apply-templates/> 39</xsl:template> 40 41<xsl:template match="d"> 42 <xsl:text>Found a D node 43</xsl:text> 44 <xsl:apply-templates/> 45</xsl:template> 46 47<xsl:template match="e"> 48 <xsl:text>Found an E node 49</xsl:text> 50 <xsl:apply-templates/> 51</xsl:template> 52 53<xsl:template match="f"> 54 <xsl:text>Found an F node 55</xsl:text> 56 <xsl:apply-templates/> 57</xsl:template> 58 59<xsl:template match="g"> 60 <xsl:text>Found a G node 61</xsl:text> 62 <xsl:apply-templates/> 63</xsl:template> 64 65<xsl:template match="h"> 66 <xsl:text>Found an H node 67</xsl:text> 68 <xsl:apply-templates/> 69</xsl:template> 70 71<xsl:template match="i"> 72 <xsl:text>Found an I node 73</xsl:text> 74 <xsl:apply-templates/> 75</xsl:template> 76 77<xsl:template match="j"> 78 <xsl:text>Found a J node 79</xsl:text> 80 <xsl:apply-templates/> 81</xsl:template> 82 83<xsl:template match="k"> 84 <xsl:text>Found a K node 85</xsl:text> 86 <xsl:apply-templates/> 87</xsl:template> 88 89<xsl:template match="l"> 90 <xsl:text>Found an L node 91</xsl:text> 92 <xsl:apply-templates/> 93</xsl:template> 94 95<xsl:template match="m"> 96 <xsl:text>Found an M node 97</xsl:text> 98 <xsl:apply-templates/> 99</xsl:template> 100 101<xsl:template match="n"> 102 <xsl:text>Found an N node 103</xsl:text> 104 <xsl:apply-templates/> 105</xsl:template> 106 107<xsl:template match="o"> 108 <xsl:text>Found an O node 109</xsl:text> 110 <xsl:apply-templates/> 111</xsl:template> 112 113<xsl:template match="p"> 114 <xsl:text>Found a P node; there should not be one! 115</xsl:text> 116 <xsl:apply-templates/> 117</xsl:template> 118 119 120 <!-- 121 * Licensed to the Apache Software Foundation (ASF) under one 122 * or more contributor license agreements. See the NOTICE file 123 * distributed with this work for additional information 124 * regarding copyright ownership. The ASF licenses this file 125 * to you under the Apache License, Version 2.0 (the "License"); 126 * you may not use this file except in compliance with the License. 127 * You may obtain a copy of the License at 128 * 129 * http://www.apache.org/licenses/LICENSE-2.0 130 * 131 * Unless required by applicable law or agreed to in writing, software 132 * distributed under the License is distributed on an "AS IS" BASIS, 133 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 134 * See the License for the specific language governing permissions and 135 * limitations under the License. 136 --> 137 138</xsl:stylesheet> 139