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 exclude-result-prefixes="lxslt"> 7 8 9<!-- Testing redirect:write append="" attribute --> 10 11 <lxslt:component prefix="redirect" elements="write open close" functions=""> 12 <lxslt:script lang="javaclass" src="org.apache.xalan.lib.Redirect"/> 13 </lxslt:component> 14 15 <xsl:template match="/doc"> 16 <standard-out> 17 <p>Standard output:</p> 18 <xsl:apply-templates select="list"/> 19 </standard-out> 20 </xsl:template> 21 22 <xsl:template match="list"> 23 <xsl:apply-templates select="item"/> 24 </xsl:template> 25 26 <!-- redirected, using append --> 27 <xsl:template match="item"> 28 <!-- Note append is treated as avt --> 29 <redirect:write select="@file" append="{@append}"> 30 <item-out> 31 <append><xsl:value-of select="@append"/></append> 32 <data><xsl:value-of select="."/></data> 33 </item-out> 34 </redirect:write> 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