Closed Bug 273912 Opened 21 years ago Closed 21 years ago

"xsl:when" instruction doesn't work with "starts-with" condition

Categories

(Core :: XSLT, defect)

1.7 Branch
x86
Linux
defect
Not set
trivial

Tracking

()

RESOLVED INVALID

People

(Reporter: tebas, Assigned: peterv)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041128 Firefox/1.0 (Debian package 1.0-4) Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041128 Firefox/1.0 (Debian package 1.0-4) the next code XSL <xsl:choose> <xsl:when test="starts-with(legalform,'P')">Particular</xsl:when><br/> <xsl:when test="starts-with(legalform,'E')">Enterprise</xsl:when><br/> </xsl:choose> make the parser chrash (Error loading stylesheet: Parsing an XSLT stylesheet failed.) PD: It can be fixed using an "xsl:if" instruction like <xsl:if test="starts-with(legalform,'P')">Particular</xsl:if><br/> But it will be better if it could be fixed :) Reproducible: Always Steps to Reproduce: 1. Make a xsl page with a xsl:when instruction using "starts-with" condition 2. Make a xml page using the xsl created 3. try to charge the xml page Actual Results: explorer shows a parser error Expected Results: show the xml page with the xsl transformation Error loading stylesheet: Parsing an XSLT stylesheet failed.
Assignee: firefox → peterv
Component: General → XSLT
Product: Firefox → Core
QA Contact: firefox.general → keith
Version: unspecified → 1.7 Branch
Please doublecheck your stylesheet, i'd be highly surpired if there's a bug here. If it still doesn't work please provide a *minimal* testcase.
actually, no need. The problem is that you have the <br/> tag outside the <xsl:when>, as a direct child of the <xsl:choose>
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.