curcuru 01/03/08 17:11:21
Added: test/tests/api/trax URIResolverTest.xml URIResolverTest.xsl
Log:
New stylesheet tests for URIResolver; still needs work on document() function
Revision Changes Path
1.1 xml-xalan/test/tests/api/trax/URIResolverTest.xml
Index: URIResolverTest.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<doc>
<list>
<item>Above Should be include-list then import-list</item>
<item>This is URIResolverTest.xml!</item>
<item match-by="import">Should be matched-by-import</item>
<item match-by="include">Should be matched-by-include</item>
<item match-by="main">Should be matched-by-import-also</item>
<list>
<item>Should be matched-by-main</item>
<item>Should be matched-by-main</item>
</list>
</list>
</doc>
1.1 xml-xalan/test/tests/api/trax/URIResolverTest.xsl
Index: URIResolverTest.xsl
===================================================================
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: URIResolverTest.xsl -->
<!-- Author: [EMAIL PROTECTED] -->
<!-- Purpose: Various kinds of URIs need to be resolved from this
stylesheet. -->
<xsl:import href="impincl/SystemIdImport.xsl"/>
<xsl:include href="impincl/SystemIdInclude.xsl"/>
<xsl:template match="doc">
<out>
<head>
<xsl:variable name="resolvedURI1"
select="document('../impincl/SystemIdImport.xsl')/xsl:stylesheet/xsl:[EMAIL
PROTECTED]'list']"/>
<xsl:variable name="resolvedURI2"
select="document('impincl/SystemIdImport.xsl')/xsl:stylesheet/xsl:[EMAIL
PROTECTED]'list']"/>
<xsl:variable name="resolvedURI3"
select="document('systemid/impincl/SystemIdImport.xsl')/xsl:stylesheet/xsl:[EMAIL
PROTECTED]'list']"/>
<xsl:text>Various document() calls: </xsl:text>
<xsl:value-of select="$resolvedURI1"/>
<xsl:text>, </xsl:text>
<xsl:value-of select="$resolvedURI2"/>
<xsl:text>, </xsl:text>
<xsl:value-of select="$resolvedURI3"/>
<xsl:text>.</xsl:text>
</head>
<xsl:apply-templates/>
</out>
</xsl:template>
<xsl:template match="list" priority="-1">
<main-list>
<xsl:apply-templates/>
</main-list>
</xsl:template>
<xsl:template match="item[not(@match-by)]">
<matched-by-main>
<xsl:value-of select="." />
</matched-by-main>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]