1<?xml version="1.0"?> 2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 xmlns:java="http://xml.apache.org/xslt/java" 4 version="1.0"> 5 6<xsl:output method="xml" indent="yes"/> 7 8 <xsl:param name="rtf"> 9 <selfrtf> 10 <paramitem name="P1"/> 11 <paramitem>param2 content</paramitem> 12 </selfrtf> 13 </xsl:param> 14 15 <xsl:template match="/list"> 16 <xsl:variable name="selfdoc" select="document('')//selfrtf"/> 17 <out> 18 <global> 19 <dumpdtm><xsl:value-of select="java:org.apache.qetest.xalanj2.DTMDumpTest.dumpDTM($rtf)"/></dumpdtm> 20 <dumpdtm><xsl:value-of select="java:org.apache.qetest.xalanj2.DTMDumpTest.dumpDTM($selfdoc)"/></dumpdtm> 21 </global> 22 <xsl:apply-templates select="item | list"/> 23 </out> 24 </xsl:template> 25 26 <xsl:template match="item"> 27 <item> 28 <value-of><xsl:value-of select="."/></value-of> 29 <dumpdtm><xsl:value-of select="java:org.apache.qetest.xalanj2.DTMDumpTest.dumpDTM(.)"/></dumpdtm> 30 </item> 31 </xsl:template> 32 33 <xsl:template match="list"> 34 <list> 35 <value-of><xsl:value-of select="."/></value-of> 36 <dumpdtm><xsl:value-of select="java:org.apache.qetest.xalanj2.DTMDumpTest.dumpDTM(.)"/></dumpdtm> 37 </list> 38 </xsl:template> 39 40 <!-- 41 * Licensed to the Apache Software Foundation (ASF) under one 42 * or more contributor license agreements. See the NOTICE file 43 * distributed with this work for additional information 44 * regarding copyright ownership. The ASF licenses this file 45 * to you under the Apache License, Version 2.0 (the "License"); 46 * you may not use this file except in compliance with the License. 47 * You may obtain a copy of the License at 48 * 49 * http://www.apache.org/licenses/LICENSE-2.0 50 * 51 * Unless required by applicable law or agreed to in writing, software 52 * distributed under the License is distributed on an "AS IS" BASIS, 53 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 54 * See the License for the specific language governing permissions and 55 * limitations under the License. 56 --> 57 58</xsl:stylesheet> 59