xref: /aosp_15_r20/external/apache-xml/test/tests/conf/mdocs/mdocs13.xsl (revision 1212f9a0ffdc28482b8821715d2222bf16dc14e2)
1<?xml version="1.0"?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
3                xmlns:ped="ped.com"
4                exclude-result-prefixes="xsl ped">
5
6  <!-- FileName: mdocs13 -->
7  <!-- Document: http://www.w3.org/TR/xpath -->
8  <!-- DocVersion: 19991116 -->
9  <!-- Section: 12.1 Multiple Source Documents  -->
10  <!-- Creator: David Marston -->
11  <!-- Purpose: When document('') refers to the root node of the stylesheet,
12     it means the current file, not the main stylesheet. In this test, the call to
13     document() is in the imported stylesheet, hence local to it. -->
14  <!-- Remember: every top-level node in the stylesheet must have a namespace. -->
15
16<xsl:import href="ximpmdocs13.xsl"/>
17
18<xsl:template match="doc">
19  <out><xsl:text>
20</xsl:text>
21    <xsl:apply-templates/><xsl:text>
22</xsl:text>
23  </out>
24</xsl:template>
25
26<ped:test attrib="yeha">Oops</ped:test>
27<ped:test attrib="haye">Wrong item from main</ped:test>
28
29
30  <!--
31   * Licensed to the Apache Software Foundation (ASF) under one
32   * or more contributor license agreements. See the NOTICE file
33   * distributed with this work for additional information
34   * regarding copyright ownership. The ASF licenses this file
35   * to you under the Apache License, Version 2.0 (the  "License");
36   * you may not use this file except in compliance with the License.
37   * You may obtain a copy of the License at
38   *
39   *     http://www.apache.org/licenses/LICENSE-2.0
40   *
41   * Unless required by applicable law or agreed to in writing, software
42   * distributed under the License is distributed on an "AS IS" BASIS,
43   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44   * See the License for the specific language governing permissions and
45   * limitations under the License.
46  -->
47
48</xsl:stylesheet>
49