xref: /aosp_15_r20/external/apache-xml/test/tests/conf/node/node07.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: node07 -->
5  <!-- Document: http://www.w3.org/TR/xpath -->
6  <!-- DocVersion: 19991116 -->
7  <!-- Section: 3 Data Model -->
8  <!-- Creator: Paul Dick -->
9  <!-- Purpose: Processing Instructions and comments within a stylesheet
10       are ignored. -->
11
12<?MyPI version="1.0"?>
13
14<xsl:template match="doc">
15  <out>
16  <?MyPI version="2.0"?>
17  <!-- This template prints out 'Testing 1 2 3' -->
18    <xsl:text>&#010;</xsl:text>
19    <xsl:value-of select="'Testing '"/>
20    <xsl:for-each select="*">
21      <xsl:value-of select="."/><xsl:text> </xsl:text>
22      <?MyPI version="3.0"?>
23    </xsl:for-each>
24
25  <!-- This calls a named template -->
26    <xsl:call-template name="ThatTemp">
27      <xsl:with-param name="sam">quos</xsl:with-param>
28      <?MyPI version="4.0"?>
29    </xsl:call-template>
30    <xsl:text>&#010;</xsl:text>
31  </out>
32</xsl:template>
33
34<!-- This is the named template that is called from above -->
35<xsl:template name="ThatTemp">
36  <xsl:param name="sam">bo</xsl:param>
37  <?MyPI version="5.0"?>
38  <xsl:copy-of select="$sam"/>
39</xsl:template>
40
41
42  <!--
43   * Licensed to the Apache Software Foundation (ASF) under one
44   * or more contributor license agreements. See the NOTICE file
45   * distributed with this work for additional information
46   * regarding copyright ownership. The ASF licenses this file
47   * to you under the Apache License, Version 2.0 (the  "License");
48   * you may not use this file except in compliance with the License.
49   * You may obtain a copy of the License at
50   *
51   *     http://www.apache.org/licenses/LICENSE-2.0
52   *
53   * Unless required by applicable law or agreed to in writing, software
54   * distributed under the License is distributed on an "AS IS" BASIS,
55   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
56   * See the License for the specific language governing permissions and
57   * limitations under the License.
58  -->
59
60</xsl:stylesheet>
61