BUG: XslTransform: Sorting an Empty Node Set Raises an Exception in the .NET Framework 1.1 (829014)
The information in this article applies to:
- Microsoft .NET Framework 1.1
SYMPTOMSWhen you try to sort an empty node set in an XSL Transformation (XSLT) that you execute by using an instance of the System.Xml.Xsl.XslTransform
type in the .NET Framework 1.1, you may receive the following error message: System.ArgumentOutOfRangeException: Index was out of range. Must
be non-negative and less than the size of the collection. Parameter name: index
CAUSEThis problem occurs only when a white space rule has been
defined in the style sheet by using the xsl:preserve-space or the xsl:strip-space XSLT
elements. RESOLUTIONTo work around this problem, use one of the following methods: - Method 1: Remove the white space rule (xsl:preserve-space or
xsl:strip-space) definitions from the style sheet. This may not always be an
option because the defined white space rules may have related functional
requirements.
- Method 2: Conditionally execute the sort after you test for the
existence of nodes in the node set.
STATUS
Microsoft has confirmed that this is a bug in the .NET Framework 1.1 implementation of the System.Xml.Xsl.XslTransform type.
Modification Type: | Major | Last Reviewed: | 10/1/2003 |
---|
Keywords: | kbbug KB829014 kbAudDeveloper |
---|
|