You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by dm...@apache.org on 2001/11/27 18:36:22 UTC
cvs commit: xml-xalan/test/tests/conf/numberformat x43import.xsl numberformat41.xsl numberformat42.xml numberformat42.xsl numberformat43.xml numberformat43.xsl numberformat44.xml numberformat44.xsl numberformat41.xml
dmarston 01/11/27 09:36:22
Added: test/tests/conf/numberformat x43import.xsl
numberformat41.xsl numberformat42.xml
numberformat42.xsl numberformat43.xml
numberformat43.xsl numberformat44.xml
numberformat44.xsl numberformat41.xml
Log:
New cases covering visibility of the xsl:decimal-format
declaration and/or harmonizing same-named declarations.
Revision Changes Path
1.1 xml-xalan/test/tests/conf/numberformat/x43import.xsl
Index: x43import.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: x43import -->
<!-- Purpose: Imported by NumberFormat43 and 44 -->
<xsl:decimal-format name="decimal3" digit='#' NaN='not a number'/>
<xsl:template name="sub">
<sub>
<xsl:value-of select="format-number('NaN','###','decimal3')"/>
<xsl:text>, </xsl:text>
<xsl:value-of select="format-number(-13.2,'###.0','decimal3')"/>
</sub>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/numberformat/numberformat41.xsl
Index: numberformat41.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:foo="http://foo.com"
xmlns:baz="http://foo.com"
exclude-result-prefixes="foo baz">
<!-- FileName: NUMBERFORMAT41 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 12.3 -->
<!-- Creator: David Bertoni -->
<!-- Purpose: Test of multiple decimal-format elements with identical qualified names.
This is allowed as long as all attributes are identical (including defaults). -->
<xsl:decimal-format name="foo:decimal1" minus-sign='-' NaN='not a number'/>
<xsl:decimal-format name="baz:decimal1" NaN='not a number' decimal-separator='.'/>
<xsl:template match="doc">
<out>
<xsl:text> </xsl:text>
<foo>
<xsl:value-of select="format-number('NaN','###','foo:decimal1')"/>
<xsl:text>, </xsl:text>
<xsl:value-of select="format-number(-13.2,'###.0','foo:decimal1')"/>
</foo>
<xsl:text> </xsl:text>
<baz>
<xsl:value-of select="format-number('NaN','###','baz:decimal1')"/>
<xsl:text>, </xsl:text>
<xsl:value-of select="format-number(-13.2,'###.0','baz:decimal1')"/>
</baz>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/numberformat/numberformat42.xml
Index: numberformat42.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/numberformat/numberformat42.xsl
Index: numberformat42.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: NUMBERFORMAT42 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 12.3 -->
<!-- Creator: David Bertoni -->
<!-- Purpose: Test of multiple decimal-format elements with identical names.
This is allowed as long as all attributes are identical (including defaults). -->
<xsl:decimal-format name="decimal2" zero-digit='0' NaN='not a number'/>
<xsl:decimal-format name="decimal2" NaN='not a number' decimal-separator='.'/>
<xsl:template match="doc">
<out>
<xsl:value-of select="format-number('NaN','###','decimal2')"/>
<xsl:text>, </xsl:text>
<xsl:value-of select="format-number(3.2,'###.0','decimal2')"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/numberformat/numberformat43.xml
Index: numberformat43.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/numberformat/numberformat43.xsl
Index: numberformat43.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: NumberFormat43 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 12.3 -->
<!-- Creator: David Marston -->
<!-- Purpose: Have two decimal-format elements with identical names, one in an import.
This is allowed as long as all attributes are identical (including defaults). -->
<xsl:import href="x43import.xsl"/>
<xsl:decimal-format name="decimal3" NaN='not a number' decimal-separator='.'/>
<xsl:template match="doc">
<out>
<xsl:text> </xsl:text>
<one>
<xsl:value-of select="format-number('NaN','###','decimal3')"/>
<xsl:text>, </xsl:text>
<xsl:value-of select="format-number(-13.2,'###.0','decimal3')"/>
</one>
<xsl:text> </xsl:text>
<xsl:call-template name="sub"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/numberformat/numberformat44.xml
Index: numberformat44.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/numberformat/numberformat44.xsl
Index: numberformat44.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: NumberFormat44 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 12.3 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test whether a decimal-format declaration in an import is visible here. -->
<xsl:import href="x43import.xsl"/>
<xsl:template match="doc">
<out>
<xsl:text> </xsl:text>
<main>
<xsl:value-of select="format-number('NaN','###','decimal3')"/>
<xsl:text>, </xsl:text>
<xsl:value-of select="format-number(-13.2,'###.0','decimal3')"/>
</main>
<xsl:text> </xsl:text>
<xsl:call-template name="sub"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/numberformat/numberformat41.xml
Index: numberformat41.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org