xref: /aosp_15_r20/external/apache-xml/test/tests/bugzilla/Bugzilla1330.xsl (revision 1212f9a0ffdc28482b8821715d2222bf16dc14e2)
1<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2    version="1.0"
3    xmlns:lxslt="http://xml.apache.org/xslt"
4    xmlns:redirect="org.apache.xalan.lib.Redirect"
5    extension-element-prefixes="redirect">
6
7  <lxslt:component prefix="redirect" elements="write open close" functions="">
8    <lxslt:script lang="javaclass" src="org.apache.xalan.lib.Redirect"/>
9  </lxslt:component>
10
11  <xsl:param name="redirectOutputName" select="'Redirect1330.out'"/>
12
13  <xsl:template match="doc">
14    <out>
15      <xsl:message>Your main output document should have a main-doc-comment and a main-doc-elem</xsl:message>
16      <xsl:comment>main-doc-comment</xsl:comment>
17        <redirect:write select="$redirectOutputName">
18          <out>
19            <xsl:message>Your redirected document <xsl:value-of select="$redirectOutputName"/> should have a redirect-doc-comment and a redirect-doc-elem</xsl:message>
20            <xsl:comment>redirect-doc-comment</xsl:comment>
21            <redirect-doc-elem/>
22          </out>
23        </redirect:write>
24      <main-doc-elem/>
25    </out>
26  </xsl:template>
27
28  <!--
29   * Licensed to the Apache Software Foundation (ASF) under one
30   * or more contributor license agreements. See the NOTICE file
31   * distributed with this work for additional information
32   * regarding copyright ownership. The ASF licenses this file
33   * to you under the Apache License, Version 2.0 (the  "License");
34   * you may not use this file except in compliance with the License.
35   * You may obtain a copy of the License at
36   *
37   *     http://www.apache.org/licenses/LICENSE-2.0
38   *
39   * Unless required by applicable law or agreed to in writing, software
40   * distributed under the License is distributed on an "AS IS" BASIS,
41   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
42   * See the License for the specific language governing permissions and
43   * limitations under the License.
44  -->
45
46</xsl:stylesheet>
47