Project

Profile

Help

Support #1346

closed

Assignment to variable makes a difference. Why?

Added by Anonymous about 18 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Internals
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Legacy ID:
sf-1481059
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

SourceForge user: ormek

Hi Everybody,

in the attached stylesheet, I do an xsl:for-each on a

set of strings. Success in accessing the context node

then seems to depend on wether I assign its string

value to a variable first (lines 42-45):

42:

<xsl:value-of select="."/>

43:

<xsl:value-of select
  ="count($TopicSelections[@value=string(.)])"/></td>

44: <xsl:variable name="v" select="string(.)"/>

45:

<xsl:value-of select
  ="count($TopicSelections[@value=$v])"/></td>

The output of lines 43 and 45 should not differ, but

they do. Only line 45 works.

I attached the stylesheet, an input file, and my result

file.

Please enlighten me about the conversion of atomic

values, sequences and trees that should cause this

behaviour if it is no bug.

BTW: I use saxonB.8-7

Best Wishes,

Oliver


Files

DiagnoseResultLimit20.xml (9.56 KB) DiagnoseResultLimit20.xml Anonymous, 2006-05-03 12:36
DiagResult2Report.xsl (9.56 KB) DiagResult2Report.xsl Anonymous, 2006-05-03 12:37
Report.html (9.56 KB) Report.html Anonymous, 2006-05-03 12:37

Please register to edit this issue

Also available in: Atom PDF