dmarston 01/09/20 09:56:49
Added: test/tests/conf/namespace namespace90.xsl namespace67.xsl
namespace68.xml namespace68.xsl namespace69.xml
namespace69.xsl namespace70.xml namespace70.xsl
namespace83.xml namespace83.xsl namespace84.xml
namespace84.xsl namespace86.xml namespace86.xsl
namespace89.xml namespace89.xsl namespace90.xml
namespace67.xml
Log:
More xsl:element and exclude-result-prefixes cases
Revision Changes Path
1.1 xml-xalan/test/tests/conf/namespace/namespace90.xsl
Index: namespace90.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: namespace90 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.2 Creating Elements -->
<!-- Creator: David Marston -->
<!-- Purpose: Test crossing prefix set at outer level with URI also attached to
different prefix in local decl. -->
<!-- NOTE: Processor developers could legitimately disagree about where the "p2"
name
has to be in scope on the result. It must be in effect for yyy, but could be
for foo
as well. The spec doesn't address this point. (Also, p1 must be reset for yyy.)
-->
<xsl:template match = "/">
<out xmlns:p1="xyz">
<xsl:element name="p1:foo" namespace="barz.com" xmlns:p2="barz.com">
<yyy/>
</xsl:element>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/namespace/namespace67.xsl
Index: namespace67.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="zilch.com" xmlns:p1="testguys.com">
<!-- FileName: namespace67 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.2 Creating Elements -->
<!-- Creator: David Marston -->
<!-- Purpose: Test for prefixed name when prefixed NS is in scope; also set
default for stylesheet. -->
<xsl:template match = "/">
<out>
<xsl:element name="p1:foo">
<yyy/>
</xsl:element>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/namespace/namespace68.xml
Index: namespace68.xml
===================================================================
<?xml version="1.0"?>
<doc>x</doc>
1.1 xml-xalan/test/tests/conf/namespace/namespace68.xsl
Index: namespace68.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: namespace68 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.2 Creating Elements -->
<!-- Creator: David Marston -->
<!-- Purpose: Set default namespace in outer, then specify namespace for inner;
add prefixed decl. -->
<!-- NOTE: Processor developers could legitimately disagree about where the "p2"
name
has to be in scope on the result, if anywhere. Since there are no LREs inside
foo,
there is no requirement to pick up and emit the p2 declaration.
The spec doesn't address this point. -->
<xsl:template match = "/">
<out xmlns="abc">
<xsl:element namespace="abc" name="foo" xmlns:p2="barz.com">
<xsl:element name="yyy"/>
</xsl:element>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/namespace/namespace69.xml
Index: namespace69.xml
===================================================================
<?xml version="1.0"?>
<doc>x</doc>
1.1 xml-xalan/test/tests/conf/namespace/namespace69.xsl
Index: namespace69.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="testguys.com">
<!-- FileName: namespace69 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.2 Creating Elements -->
<!-- Creator: David Marston -->
<!-- Purpose: Use prefixed xmlns declaration with prefixed name; default was set.
-->
<xsl:template match = "/">
<out>
<xsl:element name="p2:foo" xmlns:p2="barz.com">
<yyy/>
</xsl:element>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/namespace/namespace70.xml
Index: namespace70.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<doc>boo</doc>
1.1 xml-xalan/test/tests/conf/namespace/namespace70.xsl
Index: namespace70.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="bubba.com"
xmlns:bdd="bubba.com"
xmlns:bub="bubba.com"
exclude-result-prefixes="bub">
<!-- FileName: namespace70 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.1 Literal Result Elements -->
<!-- Creator: David Marston -->
<!-- Purpose: When there two prefixes for an NS URI, exclude-result-prefixes of
one prefix excludes all for that URI. -->
<xsl:template match="doc">
<out>
<xsl:value-of select="."/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/namespace/namespace83.xml
Index: namespace83.xml
===================================================================
<?xml version="1.0"?>
<doc>x</doc>
1.1 xml-xalan/test/tests/conf/namespace/namespace83.xsl
Index: namespace83.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="testguys.com">
<!-- FileName: namespace83 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.2 Creating Elements -->
<!-- Creator: David Marston -->
<!-- Purpose: Use prefixed name; requested NS matches default rather than what's
declared for that prefix. -->
<xsl:template match = "/">
<out>
<xsl:element name="p2:foo" namespace="testguys.com" xmlns:p2="barz.com">
<yyy/>
</xsl:element>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/namespace/namespace84.xml
Index: namespace84.xml
===================================================================
<?xml version="1.0"?>
<doc>x</doc>
1.1 xml-xalan/test/tests/conf/namespace/namespace84.xsl
Index: namespace84.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="testguys.com">
<!-- FileName: namespace84 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.2 Creating Elements -->
<!-- Creator: David Marston -->
<!-- Purpose: Use prefixed name; requested NS matches default; another decl
present. -->
<!-- NOTE: Processor developers could legitimately disagree about where the "p2"
name
has to be in scope on the result. It must be in effect for yyy, but could be
for foo
as well. The spec doesn't address this point. -->
<xsl:template match = "/">
<out>
<xsl:element name="pre:foo" namespace="testguys.com" xmlns:p2="barz.com">
<yyy/>
</xsl:element>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/namespace/namespace86.xml
Index: namespace86.xml
===================================================================
<?xml version="1.0"?>
<doc>x</doc>
1.1 xml-xalan/test/tests/conf/namespace/namespace86.xsl
Index: namespace86.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: namespace86 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.2 Creating Elements -->
<!-- Creator: David Marston -->
<!-- Purpose: Test crossing prefix set locally with namespace from outer level
(where it has other prefix). -->
<xsl:template match = "/">
<out xmlns:p1="xyz">
<xsl:element namespace="xyz" name="p2:foo" xmlns:p2="other.com">
<yyy/>
</xsl:element>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/namespace/namespace89.xml
Index: namespace89.xml
===================================================================
<?xml version="1.0"?>
<doc>x</doc>
1.1 xml-xalan/test/tests/conf/namespace/namespace89.xsl
Index: namespace89.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:a="foo.com">
<!-- FileName: namespace89 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test that exclude-result-prefixes should NOT affect xsl:element
(when prefix needed) -->
<xsl:template match="/">
<out xmlns:b="barz.com" xsl:exclude-result-prefixes="a b">
<xsl:element name="b:mid">
<xsl:element name="a:inner"/>
</xsl:element>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/namespace/namespace90.xml
Index: namespace90.xml
===================================================================
<?xml version="1.0"?>
<doc>x</doc>
1.1 xml-xalan/test/tests/conf/namespace/namespace67.xml
Index: namespace67.xml
===================================================================
<?xml version="1.0"?>
<doc>x</doc>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]