Changes specific to .NET

It is now possible to define a custom WhitespacePolicy by supplying a callback predicate which indicates whether whitespace for a particular element name is to be stripped or preserved. This provides XQuery users with a mechanism comparable to XSLT's xsl:strip-space and xsl:preserve-space, and allows fine-grained control of whitespace stripping to be taken out of the control of the transformation.

The Serializer class has two new convenience methods, allowing serialization of an XdmNode to an arbitrary Destination, or more simply to a string in .NET. These methods are equivalent to the Java versions.

New classes XdmMap and XdmArray have been added as subclasses of XdmFunctionItem, making it easier to pass maps and arrays as parameters to queries or stylesheets. The XdmMap class implements the constructor with the argument System.Collections.Generic.Dictionary<XdmAtomicValue, XdmValue>, allowing it to be used directly in contexts where a .NET Dictionary is expected (it is immutable, however).

The XdmArray class implements the constructor with the argument System.Collections.Generic.List<XdmValue>, allowing it to be used directly in context where a .NET List is expected.

The XdmValue class now has a new convenience method to make an XdmValue: MakeValue(object)

The XdmAtomicValue class now has a new convenience static method to make an XDM Atomic Value, namely: MakeAtomicValue(object). The following types are accepted: AtomicValue, boolean, string, int, long, short, char, byte, decimal, Uri and QName. We now have the method Equal(object) to compare two atomic values for equality. We now have the method GetHashCode() to get a hash code to support the equality of comparison