dmarston 00/12/17 13:24:19
Added: test/tests/conf/namespace/err namespaceerr10.xsl
namespaceerr01.xsl namespaceerr02.xml
namespaceerr02.xsl namespaceerr03.xml
namespaceerr03.xsl namespaceerr04.xml
namespaceerr04.xsl namespaceerr05.xml
namespaceerr05.xsl namespaceerr06.xml
namespaceerr06.xsl namespaceerr07.xml
namespaceerr07.xsl namespaceerr08.xml
namespaceerr08.xsl namespaceerr09.xml
namespaceerr09.xsl namespaceerr10.xml
namespaceerr01.xml
Log:
Copy of tests in Lotus/IBM repository
Revision Changes Path
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr10.xsl
Index: namespaceerr10.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:em="http://www.psol.com/xtension/1.0">
<!-- FileName: NSPCerr10 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.3 -->
<!-- Purpose: Test for meaningful message when attempting to use namespace
wildcard (*) -->
<!-- ExpectedException: XSLT: ElemTemplateElement error: Can not resolve
namespace prefix: -->
<xsl:template match="doc">
<out>
<xsl:apply-templates/>
</out>
</xsl:template>
<xsl:template match="*:foo">
<in>
<xsl:value-of select="."/>
</in>
</xsl:template>
</xsl:stylesheet>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr01.xsl
Index: namespaceerr01.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: NSPCerr01 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.1 XSLT Namespace -->
<!-- Purpose: It is an error for an element from XSLT namespace to have
attributes
with expanded-names that have null namespace URI's. -->
<!-- ExpectedException: XSL Error: xsl:copy-of has an illegal attribute: -->
<xsl:template match="doc">
<out>
<xsl:copy-of select="doc" test="0"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr02.xml
Index: namespaceerr02.xml
===================================================================
<?xml version="1.0"?>
<elements>
<block>p</block>
<block>h1</block>
<block>h2</block>
<block>h3</block>
<block>h4</block>
</elements>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr02.xsl
Index: namespaceerr02.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:axsl="http://www.w3.org/1999/XSL/TransAlias">
<!-- FileName: NSPCerr02 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.1 Literal Result Elements -->
<!-- Purpose: Test missing attribute in namespace-alias. -->
<!-- ExpectedException: Missing namespace URI for specified prefix -->
<!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException:
Missing namespace URI for specified prefix -->
<xsl:namespace-alias stylesheet-prefix="axsl"/>
<xsl:template match="/">
<axsl:stylesheet>
<xsl:apply-templates/>
</axsl:stylesheet>
</xsl:template>
<xsl:template match="block">
<axsl:template match="{.}">
<axsl:apply-templates/>
</axsl:template>
</xsl:template>
</xsl:stylesheet>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr03.xml
Index: namespaceerr03.xml
===================================================================
<?xml version="1.0"?>
<elements>
<block>p</block>
<block>h1</block>
<block>h2</block>
<block>h3</block>
<block>h4</block>
</elements>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr03.xsl
Index: namespaceerr03.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:axsl="http://www.w3.org/1999/XSL/TransAlias">
<!-- FileName: NSPCerr03 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.1 Literal Result Elements -->
<!-- Purpose: Test missing attribute in namespace-alias. -->
<!-- ExpectedException: XSLT: Missing namespace URI for specified prefix -->
<!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException:
Missing namespace URI for specified prefix -->
<!-- ExpectedException: Missing namespace URI for specified prefix -->
<xsl:namespace-alias result-prefix="xsl"/>
<xsl:template match="/">
<axsl:stylesheet>
<xsl:apply-templates/>
</axsl:stylesheet>
</xsl:template>
<xsl:template match="block">
<axsl:template match="{.}">
<axsl:apply-templates/>
</axsl:template>
</xsl:template>
</xsl:stylesheet>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr04.xml
Index: namespaceerr04.xml
===================================================================
<?xml version="1.0"?>
<docs>
<block>p</block>
<block>h1</block>
<block>h2</block>
<block>h3</block>
<block>h4</block>
</docs>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr04.xsl
Index: namespaceerr04.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:bogus="http://www.bogus_ns.com"
xmlns:lotus="http://www.lotus.com"
xmlns:ped="www.ped.com">
<!-- FileName: nspcerr04 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.1 XSLT Namespace -->
<!-- Purpose: Testing an attribute not from the XSLT namespace, which is
legal provided that the expanded name of the attribute has a non-null
namespace URI. This tests for many xslt TOP-LEVEL elements, apparent
code path
are different for numerous elements. Should not have namespaces to
inherit. -->
<!-- xsl:import href="..\test1.xsl" a="a"/ -->
<!-- xsl:include href="..\test2.xsl" b="b"/ -->
<xsl:output method="xml" indent="yes" ped:c="c"/>
<xsl:key name="sprtest" match="TestID" use="Name" ped:d="d"/>
<xsl:strip-space elements="a" ped:e="e"/>
<xsl:preserve-space elements="b" ped:f="f"/>
<xsl:variable name="Var1" ped:g="g">
DefaultValueOfVar1
</xsl:variable>
<xsl:param name="Param1" ped:h="h">
DefaultValueOfParam1
</xsl:param>
<xsl:attribute-set name="my-style" ped:i="i">
<xsl:attribute name="my-size" ped:j="j">12pt</xsl:attribute>
<xsl:attribute name="my-weight">bold</xsl:attribute>
</xsl:attribute-set>
<xsl:namespace-alias stylesheet-prefix="bogus" result-prefix="xsl" ped:k="k"/>
<xsl:decimal-format decimal-separator="," grouping-separator=" " ped:l="l"/>
<xsl:template match="docs" ped:m="m">
<bogus:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<bogus:template match="/">
<out>
Yeee ha
<xsl:for-each select="block" ped:n="n">
<xsl:if test=" .='p'" ped:o="o">
Whoopie
</xsl:if>
<xsl:value-of select="." ped:p="p"/>
</xsl:for-each>
</out>
</bogus:template>
</bogus:stylesheet>
</xsl:template>
</xsl:stylesheet>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr05.xml
Index: namespaceerr05.xml
===================================================================
<?xml version="1.0"?>
<elements>
<block>p</block>
</elements>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr05.xsl
Index: namespaceerr05.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:axsl="http://www.w3.org/1999/XSL/TransAlias">
<!-- FileName: NSPCerr05 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.1 Literal Result Elements -->
<!-- Purpose: Test placement of namespace-alias inside atemplate, which is
illegal. -->
<!-- ExpectedException: Must put xsl:namespace-alias outside any template.
-->
<!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: Must
put xsl:namespace-alias outside any template. -->
<xsl:template match="/">
<out>
<xsl:namespace-alias stylesheet-prefix="axsl" result-prefix="xsl"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr06.xml
Index: namespaceerr06.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
<ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2"
xmlns:ns1="http://xsl.lotus.com/ns1"/>
<b ns1:attrib2="test"/>
</doc>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr06.xsl
Index: namespaceerr06.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:baz1="http://xsl.lotus.com/ns1"
xmlns:baz2="http://xsl.lotus.com/ns2">
<!-- FileName: NSPCerr06 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 4.1 Node Set Functions. -->
<!-- Purpose: Test of 'local-name()' with too many arguments. -->
<!-- ExpectedException: local-name() has too many arguments. -->
<xsl:template match="baz2:doc">
<out>
<xsl:value-of select="local-name(baz2:b,..)"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr07.xml
Index: namespaceerr07.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
<ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2"
xmlns:ns1="http://xsl.lotus.com/ns1"/>
<b ns1:attrib2="test"/>
</doc>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr07.xsl
Index: namespaceerr07.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:baz1="http://xsl.lotus.com/ns1"
xmlns:baz2="http://xsl.lotus.com/ns2">
<!-- FileName: NSPCerr07 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 4.1 Node Set Functions. -->
<!-- Purpose: Test of 'namespace-uri()' with too many arguments. -->
<!-- ExpectedException: namespace-uri() has too many arguments. -->
<xsl:template match="baz2:doc">
<out>
<xsl:value-of select="namespace-uri(baz2:b,..)"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr08.xml
Index: namespaceerr08.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
<ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2"
xmlns:ns1="http://xsl.lotus.com/ns1"/>
<b ns1:attrib2="test"/>
</doc>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr08.xsl
Index: namespaceerr08.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:baz1="http://xsl.lotus.com/ns1"
xmlns:baz2="http://xsl.lotus.com/ns2">
<!-- FileName: NSPCerr08 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 4.1 Node Set Functions. -->
<!-- Purpose: Test of 'name()' with too many arguments. -->
<!-- ExpectedException: name() has too many arguments. -->
<xsl:template match="baz2:doc">
<out>
<xsl:value-of select="name(a,b)"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr09.xml
Index: namespaceerr09.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<doc xmlns:xem="http://www.psol.com/xtension/1.0">
<foo>xyz</foo>
<xem:foo>found</xem:foo>
<foo>zyx</foo>
</doc>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr09.xsl
Index: namespaceerr09.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:em="http://www.psol.com/xtension/1.0">
<!-- FileName: NSPCerr09 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.3 -->
<!-- Purpose: Test for meaningful message when pattern begins with : (has
null namespace) -->
<!-- ExpectedException: Extra illegal tokens: 'foo' -->
<xsl:template match = "doc">
<out>
<xsl:for-each select=":foo">
<xsl:value-of select="."/>
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr10.xml
Index: namespaceerr10.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<doc xmlns:xem="http://www.psol.com/xtension/1.0"
xmlns:l="http://xsl.lotus.com"/>
<foo>xyz</foo>
<xem:foo>found</xem:foo>
<l:foo>zyx</foo>
</doc>
1.1
xml-xalan/test/tests/conf/namespace/err/namespaceerr01.xml
Index: namespaceerr01.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>