Closed Bug 97556 Opened 23 years ago Closed 22 years ago

Referencing an undeclared xsl:param in not handled as an error

Categories

(Core :: XSLT, defect)

x86
Windows NT
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: jarno.elovirta, Assigned: keith)

References

()

Details

(Whiteboard: TX_BRIDGE_1_1_FIXED)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.3+) Gecko/20010829
BuildID:    2001082909

According to the XPath 1.0 spec <http://www.w3.org/TR/xpath#section-Basics> "It
is an error if the variable name
is not bound to any value in the set of variable bindings in the
expression context.". The named template "named-template-test" in
<http://www.mozilla.org/projects/xslt/test.xsl>

<!-- named template -->
<xsl:template name="named-template-test">
<xsl:param name="my-param" select="'default value'"/>
named template processed with <xsl:text> </xsl:text>
<xsl:value-of select="$my-param"/>!
   <xsl:if test="$dummy-param">
<BR/>
<FONT COLOR="red">
Error, undeclared parameters should be ignored!
     </FONT>
</xsl:if>
</xsl:template>

Should throw an error as $dummy-param is not declared.

Reproducible: Always
Steps to Reproduce:
See <http://www.mozilla.org/projects/xslt/test.xsl> named template
"named-template-test"

Actual Results:  No error occures

This is linked to bug <http://bugzilla.mozilla.org/show_bug.cgi?id=92414>, as
MSXML 3 throws an error when the undeclared parameter is referenced.
Depends on: 97581
Status: UNCONFIRMED → NEW
Ever confirmed: true
actually, i'll fix this in my variable rewrite, sorry for spam
Depends on: rewrite_variable
No longer depends on: 112622
this is more or less fixed on the branch with the checkin of bug 117658. Do we
want to keep this open until we have proper errorhandling?
Whiteboard: TX_BRIDGE_1_1_FIXED
fixed with the branchlanding, we still don't abort the execution, but that
should IMHO be fixed in a separate bug since it applies to all errorhandling in
transformiix
err.. forgot to mark this fixed
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
mass verifying
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.