dmarston 00/12/15 17:13:51
Added: test/tests/conf/impincl/err k.xsl g.xsl h.xsl
impinclerr01.xml impinclerr01.xsl impinclerr02.xml
impinclerr02.xsl impinclerr03.xml impinclerr03.xsl
impinclerr04.xml impinclerr04.xsl impinclerr05.xml
impinclerr05.xsl impinclerr06.xml impinclerr06.xsl
impinclerr07.xml impinclerr07.xsl impinclerr08.xml
impinclerr08.xsl impinclerr09.xml impinclerr09.xsl
f.xsl
Log:
Copy of tests in Lotus/IBM repository
Revision Changes Path
1.1 xml-xalan/test/tests/conf/impincl/err/k.xsl
Index: k.xsl
===================================================================
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="doc1" priority="1.0">
<xsl:for-each select="*">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/err/g.xsl
Index: g.xsl
===================================================================
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="foo">
<bad-match/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/err/h.xsl
Index: h.xsl
===================================================================
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="foo">
<best-match/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr01.xml
Index: impinclerr01.xml
===================================================================
<?xml version="1.0"?>
<root-tag>
<one-tag>Text of one-tag</one-tag>
<two-tag>Text of two-tag</two-tag>
</root-tag>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr01.xsl
Index: impinclerr01.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: ImpInclerr01 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.6.2 Style Import -->
<!-- Creator: David Marston -->
<!-- Purpose: It is an error for a stylesheet to import itself. -->
<!-- ExpectedException: (StylesheetHandler)
file:/E:\builds\testsuite\.\conf\impincl\err\impinclerr01.xsl is directly or
indirectly importing itself! -->
<!-- ExpectedException: (StylesheetHandler)
file:E:/builds/testsuite/conf/impincl/err/impinclerr01.xsl is directly or
indirectly importing itself! -->
<!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException:
(StylesheetHandler) file:E:/builds/testsuite/conf/impincl/err/impinclerr01.xsl
is directly or indirectly importing itself! -->
<xsl:import href="impinclerr01.xsl"/>
<xsl:template match="doc">
<out>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr02.xml
Index: impinclerr02.xml
===================================================================
<?xml version="1.0"?>
<doc>
<doc1>
<tag>This</tag>
<tag>That</tag>
<tag>Other</tag>
<tag>Thing</tag>
</doc1>
</doc>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr02.xsl
Index: impinclerr02.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: ImpInclerr02 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 5.6 Overriding Template Rules -->
<!-- Creator: David Marston -->
<!-- Purpose: It is an error if apply-imports is instantiated when the
current
template rule is null, i.e. from within a xsl:for-each loop. -->
<!-- ExpectedException -->
<xsl:import href="k.xsl"/>
<xsl:template match="doc">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="doc1">
<xsl:for-each select="*">
<xsl:value-of select="."/>
<xsl:apply-imports/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr03.xml
Index: impinclerr03.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr03.xsl
Index: impinclerr03.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: ImpInclerr03 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.6.2 Stylesheet Import -->
<!-- Creator: David Marston -->
<!-- Purpose: Imports must precede all other elements, including
Includes, in a stylesheet. -->
<!-- ExpectedException: (StylesheetHandler) Imports can only occur as the
first elements in the stylesheet! -->
<!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException:
(StylesheetHandler) Imports can only occur as the first elements in the
stylesheet! -->
<xsl:include href="f.xsl"/>
<xsl:import href="h.xsl"/>
<xsl:template match="doc">
<out>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr04.xml
Index: impinclerr04.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr04.xsl
Index: impinclerr04.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: ImpInclerr04 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.6.1 Style Inclusion -->
<!-- Creator: David Marston -->
<!-- Purpose: It is an error for a stylesheet to include itself. -->
<!-- ExpectedException: (StylesheetHandler)
file:/E:\builds\testsuite\.\conf\impincl\err\impinclerr04.xsl is directly or
indirectly importing itself! -->
<!-- ExpectedException: (StylesheetHandler)
file:E:/builds/testsuite/conf/impincl/err/impinclerr04.xsl is directly or
indirectly importing itself! -->
<!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException:
(StylesheetHandler) file:E:/builds/testsuite/conf/impincl/err/impinclerr04.xsl
is directly or indirectly importing itself! -->
<xsl:include href="impinclerr04.xsl"/>
<xsl:template match="doc">
<out>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr05.xml
Index: impinclerr05.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr05.xsl
Index: impinclerr05.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: impinclerr05 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.6.2 Stylesheet Import -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Check that proper error is reported if required attribute,
href,
is not included. -->
<!-- Note: SCurcuru 28-Feb-00 added ExpectedException; seems like good
error text to me. -->
<!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException:
(StylesheetHandler) Could not find href attribute for xsl:import -->
<!-- ExpectedException: (StylesheetHandler) Could not find href attribute
for xsl:import -->
<xsl:import/>
<xsl:template match="doc">
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr06.xml
Index: impinclerr06.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr06.xsl
Index: impinclerr06.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: impinclerr06 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.6.1 Stylesheet Inclusion -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Check that proper error is reported if required attribute,
href,
is not included. -->
<!-- Note: SCurcuru 28-Feb-00 added ExpectedException; seems like good
error text to me. -->
<!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException:
(StylesheetHandler) Could not find href attribute for xsl:include -->
<!-- ExpectedException: (StylesheetHandler) Could not find href attribute
for xsl:include -->
<xsl:include/>
<xsl:template match="doc">
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr07.xml
Index: impinclerr07.xml
===================================================================
<?xml version="1.0"?>
<doc>
<doc1>
<tag>This</tag>
<tag>That</tag>
<tag>Other</tag>
<tag>Thing</tag>
</doc1>
</doc>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr07.xsl
Index: impinclerr07.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: ImpInclerr07 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 5.6 Overriding Template Rules -->
<!-- Creator: David Marston -->
<!-- Purpose: Put xsl:apply-imports at top level, which is illegal. -->
<!-- ExpectedException: (StylesheetHandler) xsl:apply-imports not allowed
inside a stylesheet! -->
<!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException:
(StylesheetHandler) xsl:apply-imports not allowed inside a stylesheet! -->
<xsl:import href="k.xsl"/>
<xsl:apply-imports/>
<xsl:template match="doc">
<xsl:text>This should fail</xsl:text>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr08.xml
Index: impinclerr08.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr08.xsl
Index: impinclerr08.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: ImpInclerr08 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.6.2 Stylesheet Import -->
<!-- Creator: David Marston -->
<!-- Purpose: Test placement of xsl:import inside a template, which is
illegal. -->
<!-- ExpectedException: XSLT: (StylesheetHandler) xsl:import is not allowed
inside a template! -->
<xsl:template match="doc">
<out>
<xsl:import href="h.xsl"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr09.xml
Index: impinclerr09.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/impincl/err/impinclerr09.xsl
Index: impinclerr09.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: ImpInclerr09 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.6.1 Stylesheet Inclusion -->
<!-- Creator: David Marston -->
<!-- Purpose: Test placement of xsl:include inside a template, which is
illegal. -->
<!-- ExpectedException: XSLT: (StylesheetHandler) xsl:include is not
allowed inside a template! -->
<xsl:template match="doc">
<out>
<xsl:include href="h.xsl"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/err/f.xsl
Index: f.xsl
===================================================================
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:import href="g.xsl"/>
</xsl:stylesheet>