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: shane_curcuru@lotus.com --> 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 </xsl:stylesheet>