1<?xml version="1.0"?> 2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 version="1.0" 4 xmlns:lxslt="http://xml.apache.org/xslt" 5 xmlns:javaElem="javaElem01" 6 extension-element-prefixes="javaElem" 7 exclude-result-prefixes="lxslt"> 8 9 <lxslt:component prefix="javaElem" 10 elements="putString putBoolean putDouble putNode" functions="getCounter"> 11 <lxslt:script lang="javaclass" src="javaElem01"/> 12 </lxslt:component> 13 14<xsl:output method="xml" indent="yes"/> 15 16 <xsl:template match="doc"> 17 <out> 18 <extension-string> 19 <javaElem:putString attr="attr-String"/> 20 </extension-string> 21 <extension-ctr><xsl:value-of select="javaElem:getCounter()"/></extension-ctr> 22 <extension-boolean> 23 <javaElem:putBoolean attr="attr-Boolean"/> 24 </extension-boolean> 25 <extension-ctr><xsl:value-of select="javaElem:getCounter()"/></extension-ctr> 26 <extension-double> 27 <javaElem:putDouble attr="attr-Double"/> 28 </extension-double> 29 <extension-ctr><xsl:value-of select="javaElem:getCounter()"/></extension-ctr> 30 <extension-node> 31 <javaElem:putNode attr="attr-Node"/> 32 </extension-node> 33 <extension-ctr><xsl:value-of select="javaElem:getCounter()"/></extension-ctr> 34 </out> 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