xref: /aosp_15_r20/external/apache-xml/test/tests/api/xalanj2/TransformStateAPITest.xsl (revision 1212f9a0ffdc28482b8821715d2222bf16dc14e2)
1<?xml version="1.0"?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3<!-- xsl-comment-1 Filename: TransformStateAPITest.xsl -->
4
5
6<xsl:variable name="variable1" select="variable-1-value"/>
7<xsl:param name="param1" select="param-1-value-default"/>
8
9
10  <xsl:template match="/" name="template-1-root">
11    <doc>
12      <mode-header>
13        <xsl:text>xsl-text-1</xsl:text>
14        <xsl:value-of select="$variable1" />
15        <xsl:value-of select="$param1" />
16        <xsl:element name="xsl-element-1">
17          <xsl:attribute name="xsl-attribute-1">xsl-attribute-1-value</xsl:attribute>xsl-element-content-newline
18        </xsl:element>
19      </mode-header>
20      <mode-none><xsl:apply-templates select="item" /></mode-none>
21      <mode-ala><xsl:call-template name="apple" /></mode-ala>
22    </doc>
23  </xsl:template>
24
25  <xsl:template match="item">
26    <pie><xsl:copy/></pie>
27  </xsl:template>
28
29  <xsl:template name="apple">
30    <apple><xsl:apply-templates select="list" mode="ala" /></apple>
31  </xsl:template>
32
33  <xsl:template match="list" mode="ala">
34    <icecream>text-literal-chars<xsl:text>xsl-text-2a</xsl:text><xsl:copy-of select="."/></icecream>
35  </xsl:template>
36
37
38  <!--
39   * Licensed to the Apache Software Foundation (ASF) under one
40   * or more contributor license agreements. See the NOTICE file
41   * distributed with this work for additional information
42   * regarding copyright ownership. The ASF licenses this file
43   * to you under the Apache License, Version 2.0 (the  "License");
44   * you may not use this file except in compliance with the License.
45   * You may obtain a copy of the License at
46   *
47   *     http://www.apache.org/licenses/LICENSE-2.0
48   *
49   * Unless required by applicable law or agreed to in writing, software
50   * distributed under the License is distributed on an "AS IS" BASIS,
51   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
52   * See the License for the specific language governing permissions and
53   * limitations under the License.
54  -->
55
56</xsl:stylesheet>
57