xref: /aosp_15_r20/external/apache-xml/test/tests/conf/axes/axes116.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: AXES116 -->
5  <!-- Document: http://www.w3.org/TR/xpath -->
6  <!-- DocVersion: 19991116 -->
7  <!-- Section: 3.3 -->
8  <!-- Creator: Scott Boag -->
9  <!-- Purpose: Test for likely optimizations of descendant patterns to make sure they're done correctly. -->
10
11
12<xsl:template match="north">
13  <out>
14  <!-- DS meands the location path is optimizable as a single descendant iterator. -->
15DS   1. AC: <xsl:value-of select="name(/descendant-or-self::north)"/>
16DS   2. AD: <xsl:value-of select="name(/descendant::near-north)"/>
17DS   3. BC: <xsl:value-of select="name(self::node()/descendant-or-self::north)"/>
18DS   4. BD: <xsl:value-of select="name(self::node()/descendant::near-north)"/>
19NDS  5. CC: <xsl:value-of select="name(descendant-or-self::north/descendant-or-self::north)"/>
20NDS  6. CD: <xsl:value-of select="name(descendant-or-self::north/descendant::near-north)"/>
21NDS  7. CE: <xsl:value-of select="name(descendant-or-self::north/child::near-north)"/>
22NDS  8. DC: <xsl:value-of select="name(descendant::near-north/descendant-or-self::near-north)"/>
23NDS  9. DD: <xsl:value-of select="name(descendant::near-north/descendant::far-west)"/>
24
25NDS 10. ACC: <xsl:value-of select="name(/descendant-or-self::north/descendant-or-self::north)"/>
26NDS 11. ACE: <xsl:value-of select="name(/descendant-or-self::north/child::near-north)"/>
27NDS 12. ADC: <xsl:value-of select="name(/descendant::near-north/descendant-or-self::near-north)"/>
28NDS 13. BCC: <xsl:value-of select="name(self::node()/descendant-or-self::north/descendant-or-self::north)"/>
29NDS 14. BCE: <xsl:value-of select="name(self::node()/descendant-or-self::north/child::near-north)"/>
30NDS 15. BDC: <xsl:value-of select="name(self::node()/descendant::near-north/descendant-or-self::far-west)"/>
31NDS 16. BDE: <xsl:value-of select="name(self::node()/descendant::near-north/child::far-west)"/>
32NDS 17. CCC: <xsl:value-of select="name(descendant-or-self::north/descendant-or-self::north/descendant-or-self::north)"/>
33NDS 18. CCE: <xsl:value-of select="name(descendant-or-self::north/descendant-or-self::north/child::near-north)"/>
34NDS 19. CDC: <xsl:value-of select="name(descendant-or-self::north/descendant::near-north/descendant-or-self::near-north)"/>
35NDS 20. CDE: <xsl:value-of select="name(descendant-or-self::north/descendant::near-north/child::far-west)"/>
36NDS 21. CEC: <xsl:value-of select="name(descendant-or-self::north/child::near-north/descendant-or-self::near-north)"/>
37NDS 22. CEE: <xsl:value-of select="name(descendant-or-self::north/child::near-north/child::far-west)"/>
38NDS 23. DCC: <xsl:value-of select="name(descendant::near-north/descendant-or-self::near-north/descendant-or-self::near-north)"/>
39NDS 24. DCE: <xsl:value-of select="name(descendant::near-north/descendant-or-self::near-north/child::far-west)"/>
40NDS 25. DDC: <xsl:value-of select="name(descendant::near-north/descendant::far-west/descendant-or-self::far-west)"/>
41
42DS  26. CC: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::north)"/>
43DS  27. CD: <xsl:value-of select="name(descendant-or-self::node()/descendant::near-north)"/>
44DS  28. CE: <xsl:value-of select="name(descendant-or-self::node()/child::near-north)"/>
45DS  29. DC: <xsl:value-of select="name(descendant::node()/descendant-or-self::near-north)"/>
46DS  30. DD: <xsl:value-of select="name(descendant::node()/descendant::far-west)"/>
47
48DS  31. ACC: <xsl:value-of select="name(/descendant-or-self::node()/descendant-or-self::north)"/>
49DS  32. ACE: <xsl:value-of select="name(/descendant-or-self::node()/child::near-north)"/>
50DS  33. ADC: <xsl:value-of select="name(/descendant::node()/descendant-or-self::near-north)"/>
51DS  34. BCC: <xsl:value-of select="name(self::node()/descendant-or-self::node()/descendant-or-self::north)"/>
52DS  35. BCE: <xsl:value-of select="name(self::node()/descendant-or-self::node()/child::near-north)"/>
53DS  36. BDC: <xsl:value-of select="name(self::node()/descendant::node()/descendant-or-self::far-west)"/>
54DS  37. BDE: <xsl:value-of select="name(self::node()/descendant::node()/child::far-west)"/>
55DS  38. CCC: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::node()/descendant-or-self::north)"/>
56DS  39. CCE: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::node()/child::near-north)"/>
57DS  40. CDC: <xsl:value-of select="name(descendant-or-self::node()/descendant::node()/descendant-or-self::near-north)"/>
58DS  41. CDE: <xsl:value-of select="name(descendant-or-self::node()/descendant::node()/child::far-west)"/>
59DS  42. CEC: <xsl:value-of select="name(descendant-or-self::node()/child::node()/descendant-or-self::near-north)"/>
60DS  43. CEE: <xsl:value-of select="name(descendant-or-self::node()/child::node()/child::far-west)"/>
61DS  44. DCC: <xsl:value-of select="name(descendant::node()/descendant-or-self::node()/descendant-or-self::near-north)"/>
62DS  45. DCE: <xsl:value-of select="name(descendant::node()/descendant-or-self::node()/child::far-west)"/>
63DS  46. DDC: <xsl:value-of select="name(descendant::node()/descendant::node()/descendant-or-self::far-west)"/>
64
65  </out>
66</xsl:template>
67
68
69  <!--
70   * Licensed to the Apache Software Foundation (ASF) under one
71   * or more contributor license agreements. See the NOTICE file
72   * distributed with this work for additional information
73   * regarding copyright ownership. The ASF licenses this file
74   * to you under the Apache License, Version 2.0 (the  "License");
75   * you may not use this file except in compliance with the License.
76   * You may obtain a copy of the License at
77   *
78   *     http://www.apache.org/licenses/LICENSE-2.0
79   *
80   * Unless required by applicable law or agreed to in writing, software
81   * distributed under the License is distributed on an "AS IS" BASIS,
82   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
83   * See the License for the specific language governing permissions and
84   * limitations under the License.
85  -->
86
87</xsl:stylesheet>
88