You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2001/10/15 21:11:32 UTC
DO NOT REPLY [Bug 4175] New: -
xsltc fails conf test variable48 propagating params into templates
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4175>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4175
xsltc fails conf test variable48 propagating params into templates
Summary: xsltc fails conf test variable48 propagating params into
templates
Product: XalanJ2
Version: CurrentCVS
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: org.apache.xalan.xsltc
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: tom.amiro@sun.com
This test is not very atomic; it has a lot going on. It purports to test the
propagation of params down into templates. Saxon and Xalan produce the
same output. XSLTC gives a warning but still runs; however, the output
is significantly different than the expected output.
Here's a test session comparing xalan to xsltc followed by snapshots
of the test files.
Running xalan on variable48
<?xml version="1.0" encoding="UTF-8"?>
<doc Value="top, id=id0">
<a Value="top, id=id1">
*id1*
<a Value="top, id=id2">*id2*
<a Value="top, id=id3">*id3*<from>top, id2</from></a>
<b Value="top, id=id4">*id4*<from>top, id2</from></b>
<c Value="top, id=id5">*id5*<from>top, id2</from></c>
<from>top, id1</from></a>
<b Value="top, id=id6">*id6*<from>top, id1</from></b>
<c Value="top, id=id7">*id7*<from>top, id1</from></c>
<from>top, id0</from></a>
<b Value="top, id=id8">
*id8*
<a Value="top, id=id9">*id9*<from>top, id8</from></a>
<b Value="top, id=id10">*id10*
<a Value="top, id=id11">*id11*<from>top, id10</from></a>
<b Value="top, id=id12">*id12*<from>top, id10</from></b>
<c Value="top, id=id13">*id13*<from>top, id10</from></c>
<from>top, id8</from></b>
<c Value="top, id=id14">*id14*<from>top, id8</from></c>
<from>top, id0</from></b>
<c Value="top, id=id15">
*id15*
<a Value="top, id=id16">*id16*<from>top, id15</from></a>
<b Value="top, id=id17">*id17*<from>top, id15</from></b>
<c Value="top, id=id18">*id18*
<a Value="top, id=id19">*id19*<from>top, id18</from></a>
<from>top, id15</from></c>
<from>top, id0</from></c>
<from>top, root</from></doc>
Running XSLTC with Xerces Parser on variable48
Warning:
file:/net/bigblock/files18/tamiro/suntest/Conformance/testsuite/variable/variable48.xsl:
Line 45: Attribute 'Value' outside of element.
<?xml version="1.0" encoding="UTF-8" ?>
<doc>
<a>
*id1*
<a>*id2*
<a>*id3*<from>top, id2</from></a>
<b>*id4*<from>top, id2</from></b>
<c>*id5*<from>top, id2</from></c>
<from>top, id1</from></a>
<b>*id6*<from>top, id1</from></b>
<c>*id7*<from>top, id1</from></c>
<from>top, id0</from></a>
<b>
*id8*
<a>*id9*<from>top, id8</from></a>
<b>*id10*
<a>*id11*<from>top, id10</from></a>
<b>*id12*<from>top, id10</from></b>
<c>*id13*<from>top, id10</from></c>
<from>top, id8</from></b>
<c>*id14*<from>top, id8</from></c>
<from>top, id0</from></b>
<c>
*id15*
<a>*id16*<from>top, id15</from></a>
<b>*id17*<from>top, id15</from></b>
<c>*id18*
<a>*id19*<from>top, id18</from></a>
<from>top, id15</from></c>
<from>top, id0</from></c>
<from>top, root</from></doc>
variable48.xsl
--------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" indent="no" encoding="UTF-8"/>
<!-- FileName: variable48 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 11.5 -->
<!-- Purpose: Check propagation of params down into templates -->
<!-- Author: Scott Boag -->
<xsl:param name="request" select="'top'"/>
<xsl:template match="/">
<xsl:apply-templates>
<xsl:with-param name="p1" select="$request"/>
<xsl:with-param name="p2" select="'root'"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="*">
<xsl:param name="p1" select="'error1!'"/>
<xsl:param name="p2" select="'error2!'"/>
<xsl:copy>
<xsl:apply-templates select="node()|@*">
<xsl:with-param name="p1" select="$request"/>
<xsl:with-param name="p2" select="@id"/>
</xsl:apply-templates>
<from>
<xsl:call-template name="dump-values">
<xsl:with-param name="p1" select="$request"/>
<xsl:with-param name="p2" select="$p2"/>
</xsl:call-template>
</from>
</xsl:copy>
</xsl:template>
<xsl:template match="@*">
<xsl:param name="p1" select="'error3!'"/>
<xsl:param name="p2" select="'error4!'"/>
<xsl:attribute name="Value">
<xsl:call-template name="dump-values">
<xsl:with-param name="p1" select="$p1"/>
<xsl:with-param name="p2" select="concat('id=', string($p2))"/>
</xsl:call-template>
</xsl:attribute>
</xsl:template>
<xsl:template name="dump-values">
<xsl:param name="p1" select="'error5!'"/>
<xsl:param name="p2" select="'error6!'"/>
<xsl:value-of select="$p1"/>, <xsl:value-of select="$p2"/>
</xsl:template>
</xsl:stylesheet>
variable48.xml
--------------
<?xml version="1.0"?>
<doc id="id0">
<a id="id1">
*id1*
<a id="id2">*id2*
<a id="id3">*id3*</a>
<b id="id4">*id4*</b>
<c id="id5">*id5*</c>
</a>
<b id="id6">*id6*</b>
<c id="id7">*id7*</c>
</a>
<b id="id8">
*id8*
<a id="id9">*id9*</a>
<b id="id10">*id10*
<a id="id11">*id11*</a>
<b id="id12">*id12*</b>
<c id="id13">*id13*</c>
</b>
<c id="id14">*id14*</c>
</b>
<c id="id15">
*id15*
<a id="id16">*id16*</a>
<b id="id17">*id17*</b>
<c id="id18">*id18*
<a id="id19">*id19*</a>
</c>
</c>
</doc>