1<?xml version='1.0'?> 2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 3 <!-- FileName: URIResolverTest.xsl --> 4 <!-- Author: [email protected] --> 5 <!-- Purpose: Various kinds of URIs need to be resolved from this stylesheet. --> 6 7<xsl:import href="impincl/SystemIdImport.xsl"/> 8<xsl:include href="impincl/SystemIdInclude.xsl"/> 9 10<xsl:template match="doc"> 11 <out> 12 <head> 13 <xsl:variable name="resolvedURI1" select="document('../impincl/SystemIdImport.xsl')/xsl:stylesheet/xsl:template[@match='list']"/> 14 <xsl:variable name="resolvedURI2" select="document('impincl/SystemIdImport.xsl')/xsl:stylesheet/xsl:template[@match='list']"/> 15 <xsl:variable name="resolvedURI3" select="document('systemid/impincl/SystemIdImport.xsl')/xsl:stylesheet/xsl:template[@match='list']"/> 16 <xsl:text>Various document() calls: </xsl:text> 17 <xsl:value-of select="$resolvedURI1"/> 18 <xsl:text>, </xsl:text> 19 <xsl:value-of select="$resolvedURI2"/> 20 <xsl:text>, </xsl:text> 21 <xsl:value-of select="$resolvedURI3"/> 22 <xsl:text>.</xsl:text> 23 </head> 24 <xsl:apply-templates/> 25 </out> 26</xsl:template> 27 28<xsl:template match="list" priority="-1"> 29 <main-list> 30 <xsl:apply-templates/> 31 </main-list> 32</xsl:template> 33 34<xsl:template match="item[not(@match-by)]"> 35 <matched-by-main> 36 <xsl:value-of select="." /> 37 </matched-by-main> 38</xsl:template> 39 40 41 <!-- 42 * Licensed to the Apache Software Foundation (ASF) under one 43 * or more contributor license agreements. See the NOTICE file 44 * distributed with this work for additional information 45 * regarding copyright ownership. The ASF licenses this file 46 * to you under the Apache License, Version 2.0 (the "License"); 47 * you may not use this file except in compliance with the License. 48 * You may obtain a copy of the License at 49 * 50 * http://www.apache.org/licenses/LICENSE-2.0 51 * 52 * Unless required by applicable law or agreed to in writing, software 53 * distributed under the License is distributed on an "AS IS" BASIS, 54 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 55 * See the License for the specific language governing permissions and 56 * limitations under the License. 57 --> 58 59</xsl:stylesheet> 60