dmarston 00/12/17 10:43:41
Added: test/tests/conf/lre lre16.xsl inclre05.xsl lre01.xml
lre01.xsl lre02.xml lre02.xsl lre03.xml lre03.xsl
lre04.xml lre04.xsl lre05.xml lre05.xsl lre06.xml
lre06.xsl lre07.xml lre07.xsl lre08.xml lre08.xsl
lre09.xml lre09.xsl lre10.xml lre10.xsl lre11.xml
lre11.xsl lre12.xml lre12.xsl lre13.xml lre13.xsl
lre14.xml lre14.xsl lre15.xml lre15.xsl lre16.xml
implre05.xsl
Log:
Copy of tests in Lotus/IBM repository
Revision Changes Path
1.1 xml-xalan/test/tests/conf/lre/lre16.xsl
Index: lre16.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" >
<!-- FileName: LRE16 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.1 Literal Result Elements-->
<!-- Purpose: Try to put out value of a variable as an LRE. Get "$var"
literally. -->
<!-- Creator: David Marston -->
<xsl:variable name="var" select="'Data'"/>
<xsl:template match="/">
<out>$var</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/inclre05.xsl
Index: inclre05.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="http://tester.com">
<xsl:template match="doc3">
<include />
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/lre01.xml
Index: lre01.xml
===================================================================
<?xml version="1.0"?>
<doc>DocValue
</doc>
1.1 xml-xalan/test/tests/conf/lre/lre01.xsl
Index: lre01.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ext="http://somebody.elses.extension"
xmlns:ped="http://www.test.com"
extension-element-prefixes="ext">
<!-- FileName: lre01 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.1 Literal Result Elements -->
<!-- Creator: Paul Dick -->
<!-- Purpose: In a template, an element in the stylesheet that does not
belong to
the XSLT namespace and that is not an extension element is instantiated to
create
an element node with the same expanded-name. ... The created element node
will
have the attribute nodes that were present on the element node in the
stylesheet
tree, other than attributes with names in the XSLT namespace -->
<xsl:template match="doc">
<out xsl:if= "my if" english="to leave" ped:attr="test">
<ext:this name="my fake extension"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/lre02.xml
Index: lre02.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/lre/lre02.xsl
Index: lre02.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ext="http://somebody.elses.extension"
xmlns:java="http://xml.apache.org/xslt/java"
xmlns:ped="http://tester.com"
xmlns:bdd="http://buster.com"
xmlns:jad="http://administrator.com"
xmlns="www.lotus.com"
exclude-result-prefixes="java jad #default"
extension-element-prefixes="ext">
<!-- FileName: lre02 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.1 Literal Result Elements-->
<!-- Creator: Paul Dick -->
<!-- Purpose: The created element node will also have a copy of the
namespace nodes
that were present on the element node in the stylesheet tree with the
exception
of any namespace node whose string-value is the XSLT namespace URI, a
namespace
URI declared as an extension namespace, or a namespace URI designated
as an
excluded namespace. Excluded namespaces specified with
exclude-result-prefixes
attribute of xsl:stylesheet . -->
<xsl:template match="doc">
<out xsl:if= "my if" english="to leave"/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/lre03.xml
Index: lre03.xml
===================================================================
<?xml version="1.0"?>
<doc>DocValue
</doc>
1.1 xml-xalan/test/tests/conf/lre/lre03.xsl
Index: lre03.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ext="http://somebody.elses.extension"
xmlns:java="http://xml.apache.org/xslt/java"
xmlns:ped="http://tester.com"
xmlns:bdd="http://buster.com"
xmlns:jad="http://administrator.com"
xmlns="www.lotus.com"
extension-element-prefixes="ext">
<!-- FileName: lre03 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.1 Literal Result Elements-->
<!-- Creator: Paul Dick -->
<!-- Purpose: The created element node will also have a copy of the
namespace nodes
that were present on the element node in the stylesheet tree with the
exception
of any namespace node whose string-value is the XSLT namespace URI, a
namespace
URI declared as an extension namespace, or a namespace URI designated
as an
excluded namespace. Excluded namespaces specified with
xsl:exclude-result-prefixes
attribute of LRE. -->
<xsl:template match="doc">
<out xsl:if= "my if" english="to leave" xsl:exclude-result-prefixes="java
jad #default"/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/lre04.xml
Index: lre04.xml
===================================================================
<?xml version="1.0"?>
<doc>DocValue
</doc>
1.1 xml-xalan/test/tests/conf/lre/lre04.xsl
Index: lre04.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="http://tester.com"
xmlns:bdd="http://buster.com"
xmlns:jad="http://administrator.com">
<!-- FileName: lre04 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.1 Literal Result Elements-->
<!-- Creator: Paul Dick -->
<!-- Purpose: The designation of a namespace as an excluded namespace is
effective within the subtree of the stylesheet rooted at the element
bearing the exclude-result-prefixes or xsl:exclude-result-prefixes
attribute. -->
<xsl:template match="doc">
<out x="by the corner" xsl:if= "my if" /><xsl:text>
</xsl:text>
<sits x="little jack horner"
xsl:exclude-result-prefixes="jad"/><xsl:text>
</xsl:text>
<minding x="his peas and queues" xsl:exclude-result-prefixes="jad bdd"/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/lre05.xml
Index: lre05.xml
===================================================================
<?xml version="1.0"?>
<docs>
<doc1/>
<doc2/>
<doc3/>
</docs>
1.1 xml-xalan/test/tests/conf/lre/lre05.xsl
Index: lre05.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="http://tester.com">
<xsl:import href="implre05.xsl"/>
<xsl:include href="inclre05.xsl"/>
<!-- FileName: lre05 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.1 Literal Result Elements-->
<!-- Creator: Paul Dick -->
<!-- Purpose: a subtree rooted at an xsl:stylesheet element does not
include any
stylesheets imported or included by children of that xsl:stylesheet
element. -->
<xsl:template match="doc1">
<out xsl:exclude-result-prefixes="ped">
<xsl:apply-imports/>
<xsl:apply-templates select="doc3"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/lre06.xml
Index: lre06.xml
===================================================================
<?xml version="1.0"?>
<docs>
<doc1>
<a level="1">A1</a>
<b level="1">B2</b>
<c level="1">C3</c>
</doc1>
<doc2>
<a level="2">A1</a>
<b level="2">B2</b>
<c level="2">C3</c>
<doc3>
<a level="3">A1</a>
<bat level="3">B22</bat>
<cat level="3">C33</cat>
</doc3>
</doc2>
</docs>
1.1 xml-xalan/test/tests/conf/lre/lre06.xsl
Index: lre06.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: lre06 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.1 Literal Result Elements-->
<!-- Creator: Paul Dick -->
<!-- Purpose: Tests that the value of an attribute of a LRE is
interpreted as a attribute value template, which can contain
expressions within curly braces({}). -->
<xsl:template match="docs">
<out a="{doc1/a}" b="{doc2/doc3/bat}"
c="{doc2/doc3/a/@level}"
d="{.//*[starts-with(name(.),'ba')]}"
e="{.//cat}" f="{'All Done'}">
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/lre07.xml
Index: lre07.xml
===================================================================
<?xml version="1.0"?>
<docs>
<doc/>
</docs>
1.1 xml-xalan/test/tests/conf/lre/lre07.xsl
Index: lre07.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="http://www.test.com">
<xsl:output indent="yes"/>
<!-- FileName: lre07 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.2 Creating Elements with xsl:element. -->
<!-- Creator: Paul Dick -->
<!-- Purpose: The xsl:element element allows an element to be created with
a
computed name. The expanded-name of the element to be created is
specified
by a required name attribute and an optional namespace attribute. -->
<xsl:template match="doc">
<root>
<xsl:element name="out1"/>
<xsl:element name="out2" namespace="http://www.test.com"/>
<xsl:element name="out3" namespace="http://www.bdd.com"/>
</root>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/lre08.xml
Index: lre08.xml
===================================================================
<?xml version="1.0"?>
<docs>
<doc1>
<a level="1">A1</a>
<b level="1">B2</b>
<c level="1">C3</c>
</doc1>
<doc2>
<a level="2">A1</a>
<b level="2">B2</b>
<c level="2">C3</c>
<doc3>
<a level="Out1">A1</a>
<bat level="3">Out2</bat>
<cat level="3">C33</cat>
</doc3>
</doc2>
</docs>
1.1 xml-xalan/test/tests/conf/lre/lre08.xsl
Index: lre08.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: lre08 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.2 Creating Elements with xsl:element. -->
<!-- Creator: Paul Dick -->
<!-- Purpose: The name attribute of xsl:element is interpreted as an
attribute value template. -->
<xsl:template match="/">
<xsl:element name="{.//doc2/doc3/a/@level}"/>
<xsl:element name="{.//*[starts-with(name(.),'ba')]}"/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/lre09.xml
Index: lre09.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>ped:Out1</a>
<b>xyz:Out2</b>
</doc>
1.1 xml-xalan/test/tests/conf/lre/lre09.xsl
Index: lre09.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="http://www.tester.com">
<xsl:output indent="yes"/>
<!-- FileName: lre09 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.2 Creating Elements with xsl:element. -->
<!-- Creator: Paul Dick -->
<!-- Purpose: It is an error if the string that results from instantiating
the attribute value template is not a QName. An XSLT processor may
signal
the error; if it does not signal the error, then it must recover by
making
the the result of instantiating the xsl:element element be the
sequence of
nodes created by instantiating the content of the xsl:element element,
excluding any initial attribute nodes. -->
<xsl:template match="doc">
<root>
<xsl:element name="{a}"/>
<xsl:element name="{b}">
<xsl:attribute name="attr1">Hello</xsl:attribute>
<xsl:attribute name="attr2">Goodbye</xsl:attribute>
<HTML><body>
<xsl:element name="text">
<xsl:attribute name="font">Courier</xsl:attribute>
What's Up
</xsl:element>
</body></HTML>
</xsl:element>
</root>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/lre10.xml
Index: lre10.xml
===================================================================
<?xml version="1.0"?>
<docs>
<a href="http://www.ped.com">Out1</a>
<b href="">Out2</b>
<c href="http://www.bdd.com">Out3</c>
</docs>
1.1 xml-xalan/test/tests/conf/lre/lre10.xsl
Index: lre10.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="http://www.ped.com">
<xsl:output indent="yes"/>
<!-- FileName: lre10 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.2 Creating Elements with xsl:element. -->
<!-- Creator: Paul Dick -->
<!-- Purpose: If the namespace attribute is present, then it also is
interpreted as
an attribute value template... -->
<xsl:template match="/">
<root>
<xsl:element name="{docs/a}" namespace="{docs/a/@href}"/>
<xsl:element name="{docs/b}" namespace="{docs/b/@href}"/>
<xsl:element name="{docs/c}" namespace="{docs/c/@href}"/>
</root>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/lre11.xml
Index: lre11.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/lre/lre11.xsl
Index: lre11.xsl
===================================================================
<?xml version="1.0"?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ext="http://somebody.elses.extension"
xmlns:java="http://xml.apache.org/xslt/java"
xmlns:jad="http://administrator.com"
xmlns="www.lotus.com"
xmlns:ped="http://tester.com"
xmlns:bdd="http://buster.com"
extension-element-prefixes="ext"
exclude-result-prefixes="java jad #default">
<!-- FileName: lre11 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.2 Stylesheet Element -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Testing the xsl:transform element and its attributes. english
attribute and ped,bdd namespace nodes are all that should be output.
-->
<xsl:template match="doc">
<out xsl:if= "my if" english="to leave"/>
</xsl:template>
</xsl:transform>
1.1 xml-xalan/test/tests/conf/lre/lre12.xml
Index: lre12.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/lre/lre12.xsl
Index: lre12.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: LRE12 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.2 Creating Elements -->
<!-- Creator: David Marston -->
<!-- Purpose: Test warning if required element name is null.-->
<!-- ExpectedException: XSL Warning: Illegal attribute name: -->
<!-- The above is issued as a warning, then the content is put out as an
LRE. -->
<xsl:template match="doc">
<out>
<xsl:element name="">
This should be directly inside the out element.
</xsl:element>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/lre13.xml
Index: lre13.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/lre/lre13.xsl
Index: lre13.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: LRE13 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.2 Creating Elements -->
<!-- Creator: David Marston -->
<!-- Purpose: Try to put out text without any tags.-->
<xsl:output method="text"/>
<xsl:template match="doc">
This should be directly at the top.
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/lre14.xml
Index: lre14.xml
===================================================================
<?xml version="1.0"?>
<docs>
<doc/>
<a>X</a>
<a>Y</a>
<a>Z</a>
</docs>
1.1 xml-xalan/test/tests/conf/lre/lre14.xsl
Index: lre14.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: LRE14 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.2 Creating Elements with xsl:element. -->
<!-- Creator: David Marston -->
<!-- Purpose: Test for-each inside xsl:element -->
<xsl:template match="docs">
<out>
<xsl:element name="all">
<xsl:for-each select="a">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:element>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/lre15.xml
Index: lre15.xml
===================================================================
<?xml version="1.0"?>
<doc>DocValue
</doc>
1.1 xml-xalan/test/tests/conf/lre/lre15.xsl
Index: lre15.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="http://tester.com"
xmlns:ljh="http://buster.com"
xmlns:jad="http://administrator.com">
<xsl:output method="xml" indent="yes"/>
<!-- FileName: lre15 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.1 Literal Result Elements-->
<!-- Creator: Paul Dick -->
<!-- Purpose: xsl:exclude-result-prefixes should
only work to omit namespace declarations that are not actually used.
-->
<xsl:template match="doc">
<out x="by the corner" xsl:if= "my if">
<jad:output1/>
<jad:output2>
<jad:output2a/>
</jad:output2>
<ljh:output1/>
<ljh:output2>
<ljh:output2a/>
</ljh:output2>
</out>
<sits x="little jack horner" xsl:exclude-result-prefixes="ped jad"/>
<minding x="his peas and queues" xsl:exclude-result-prefixes="jad ljh">
<jad:output1/>
<jad:output2>
<jad:output2a/>
</jad:output2>
<ljh:output1/>
<ljh:output2>
<ljh:output2a/>
</ljh:output2>
</minding>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/lre/lre16.xml
Index: lre16.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/lre/implre05.xsl
Index: implre05.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="http://tester.com">
<xsl:template match="doc2">
<import />
</xsl:template>
</xsl:stylesheet>