xref: /aosp_15_r20/external/apache-xml/test/tests/conf/idkey/idkey60.xsl (revision 1212f9a0ffdc28482b8821715d2222bf16dc14e2)
1<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
2
3  <!-- FileName: idkey60 -->
4  <!-- Document: http://www.w3.org/TR/xslt -->
5  <!-- DocVersion: 19991116 -->
6  <!-- Section: 5.2 -->
7  <!-- Purpose: Try multiple child steps after id() in match patterns -->
8  <!-- Creator: Henry Zongaro -->
9
10<xsl:output method="xml" encoding="UTF-8" indent="no"/>
11
12  <xsl:template match='/'>
13    <out>
14      <xsl:apply-templates/><!-- rely on some built-ins -->
15    </out>
16  </xsl:template>
17
18  <xsl:template match='id("abc")/l1/v'>
19    <xsl:text>
20</xsl:text>
21    <match-l1-v>
22      <xsl:value-of select='.'/>
23    </match-l1-v>
24  </xsl:template>
25
26  <xsl:template match='id("abc")/l2/v'>
27    <xsl:text>
28</xsl:text>
29    <match-l2-v>
30      <xsl:value-of select='.'/>
31    </match-l2-v>
32  </xsl:template>
33
34  <xsl:template match='id("abc")/l1/l2/w'>
35    <xsl:text>
36</xsl:text>
37    <match-l1-l2-w>
38      <xsl:value-of select='.'/>
39    </match-l1-l2-w>
40  </xsl:template>
41
42  <xsl:template match='id("abc")/l3/v'>
43    <xsl:text>
44</xsl:text>
45    <match-l3-v>
46      <xsl:value-of select='.'/>
47    </match-l3-v>
48  </xsl:template>
49
50  <xsl:template match='v'>
51    <xsl:text>
52</xsl:text>
53    <match-v>
54      <xsl:value-of select='.'/>
55    </match-v>
56  </xsl:template>
57
58  <xsl:template match='text()'/><!-- squelch direct replay of text -->
59
60
61  <!--
62   * Licensed to the Apache Software Foundation (ASF) under one
63   * or more contributor license agreements. See the NOTICE file
64   * distributed with this work for additional information
65   * regarding copyright ownership. The ASF licenses this file
66   * to you under the Apache License, Version 2.0 (the  "License");
67   * you may not use this file except in compliance with the License.
68   * You may obtain a copy of the License at
69   *
70   *     http://www.apache.org/licenses/LICENSE-2.0
71   *
72   * Unless required by applicable law or agreed to in writing, software
73   * distributed under the License is distributed on an "AS IS" BASIS,
74   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
75   * See the License for the specific language governing permissions and
76   * limitations under the License.
77  -->
78
79</xsl:stylesheet>
80