xref: /aosp_15_r20/external/apache-xml/test/tests/conf/select/select75.xsl (revision 1212f9a0ffdc28482b8821715d2222bf16dc14e2)
1<?xml version="1.0"?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
4  <!-- FileName: select75 -->
5  <!-- Document: http://www.w3.org/TR/xpath -->
6  <!-- DocVersion: 19991116 -->
7  <!-- Section: 5.1 Root node -->
8  <!-- Creator: David Marston -->
9  <!-- Purpose: Ensure that select='/' gets what it should. -->
10
11<xsl:template match="/">
12  <out>
13    <xsl:apply-templates select="doc"/>
14    <xsl:text>
15</xsl:text>
16  </out>
17</xsl:template>
18
19<xsl:template match="doc">
20  <xsl:apply-templates select="comment()" mode="showcomments"/>
21  <xsl:apply-templates select="inner"/>
22</xsl:template>
23
24<xsl:template match="inner">
25  <xsl:apply-templates select="/" mode="showcomments"/>
26</xsl:template>
27
28<xsl:template match="/" mode="showcomments">
29  <xsl:text>
30...Back to top...</xsl:text>
31  <xsl:apply-templates select="comment()" mode="showcomments"/>
32</xsl:template>
33
34<xsl:template match="comment()" mode="showcomments">
35  <xsl:text>
36Comment found:</xsl:text>
37  <xsl:value-of select="."/>
38</xsl:template>
39
40
41  <!--
42   * Licensed to the Apache Software Foundation (ASF) under one
43   * or more contributor license agreements. See the NOTICE file
44   * distributed with this work for additional information
45   * regarding copyright ownership. The ASF licenses this file
46   * to you under the Apache License, Version 2.0 (the  "License");
47   * you may not use this file except in compliance with the License.
48   * You may obtain a copy of the License at
49   *
50   *     http://www.apache.org/licenses/LICENSE-2.0
51   *
52   * Unless required by applicable law or agreed to in writing, software
53   * distributed under the License is distributed on an "AS IS" BASIS,
54   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
55   * See the License for the specific language governing permissions and
56   * limitations under the License.
57  -->
58
59</xsl:stylesheet>
60