Issue Details (XML | Word | Printable)

Key: XALANJ-2294
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Henry Zongaro
Reporter: Henry Zongaro
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XalanJ2

XSLTC does not handle the key or id functions correctly when multiple input documents are involved

Created: 25/Apr/06 02:18 AM   Updated: 11/Dec/07 04:57 PM
Return to search
Component/s: DTM, XSLTC
Affects Version/s: 2.7
Fix Version/s: 2.7.1

Time Tracking:
Not Specified

File Attachments:
  Size
XML File Licensed for inclusion in ASF works j2294.out 2006-04-25 02:25 AM Henry Zongaro 2 kB
XML File Licensed for inclusion in ASF works j2294.xml 2006-04-25 02:24 AM Henry Zongaro 0.8 kB
XML File Licensed for inclusion in ASF works j2294.xsl 2006-04-25 02:24 AM Henry Zongaro 2 kB
XML File Licensed for inclusion in ASF works j2294a.xml 2006-04-25 02:24 AM Henry Zongaro 0.9 kB
XML File Licensed for inclusion in ASF works j2294b.xml 2006-04-25 02:25 AM Henry Zongaro 1 kB

Reviewer: Christine Li
Resolution Date: 08/Jun/06 03:29 AM


 Description  « Hide
The implementation of the key and id functions in XSLTC assumes that there is only one input document. When more than one input document is involved, the functions should return nodes only in the same document as the context node. However, XSLTC ends up to put all the matching nodes with a particular key value or all the nodes with the same ID value in the same table, regardless of the source document. The table entries are DTM node identifiers, rather than node handles, so it's not possible to tell which document they actually came from. When either function is evaluated, it will treat all the node identifiers as if they represented nodes in the same document as the context node, so they might return seemingly random nodes or even produce an ArrayIndexOutOfBoundsException.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Henry Zongaro added a comment - 25/Apr/06 02:25 AM
Attaching example test case: j2294.xsl (stylesheet), j2294.xml (primary input), j2294a.xml and j2294b.xml (secondary input), j2294.out (expected output)

Henry Zongaro added a comment - 10/May/06 01:57 AM
Patch for XALANJ-2295 includes a fix for this problem.

Henry Zongaro added a comment - 08/Jun/06 03:29 AM
Applied patch attached to XALANJ-2295 to source repository.

Brian Minchau added a comment - 11/Dec/07 03:16 PM
This issue is no longer relevant for 2.7.1, it is fixed in 2.7.1.
Changing the affected version to 2.7.

Brian Minchau added a comment - 11/Dec/07 04:57 PM
Would the originator of this issue please verify that this issue is fixed in the 2.7.1 release, by adding a comment to this issue, so that we can close this issue.

A lack of response by February 1, 2008 will be taken as consent that we can close this resolved issue.

Regards,
Brian Minchau