xmlunit-core : Org.XmlUnit.Transform Namespace

Transformation Class

Provides a convenience layer over System.Xml.Xsl.

Syntax

public sealed class Transformation

Remarks

Apart from ArgumentExceptions if you try to pass in null values only the Transform methods will ever throw exceptions and these will be XMLUnit's exceptions. Each invocation of a Transform method will use a fresh XslCompiledTransform instance, the Transform methods are thread-safe.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

Members

See Also: Inherited members from object.

Public Constructors

Creates a new transformation without source or stylesheet.
Creates a new transformation with a given source.

Public Properties

[write-only]
EnableDocumentFunction bool . Whether the document() function will be allowed.
[write-only]
EnableScriptBlocks bool . Whether embedded script blocks will be allowed.
[write-only]
Source Org.XmlUnit.ISource . Set the source document to transform - must not be null.
[write-only]
Stylesheet Org.XmlUnit.ISource . Set the stylesheet to use - may be null in which case an identity transformation will be performed.
[write-only]
XmlResolver System.Xml.XmlResolver . Set the resolver to use for document() and xsl:include/import

Public Methods

AddExtensionObject (string, object)
Add a named extension object.
AddParameter (string, string, object)
Add a named parameter.
Clear ()
Clears all extension objects and parameters.
TransformTo (System.IO.Stream)
Perform the transformation.
TransformTo (System.IO.TextWriter)
Perform the transformation.
TransformTo (System.Xml.XmlWriter)
Perform the transformation.
TransformToDocument () : System.Xml.XmlDocument
Convenience method that returns the result of the transformation as a Document.
TransformToDocument (System.Xml.XmlResolver) : System.Xml.XmlDocument
Convenience method that returns the result of the transformation as a Document.
TransformToString () : string
Convenience method that returns the result of the transformation as a String.

Extension Methods

static
Singleton<T> (this T) : IEnumerable<T>
An enumerable containing a single element.

Member Details

Transformation Constructor

Creates a new transformation without source or stylesheet.

Syntax

public Transformation ()

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

Transformation Constructor

Creates a new transformation with a given source.

Syntax

public Transformation (Org.XmlUnit.ISource s)

Parameters

s
the source to transform - must not be null.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

AddExtensionObject Method

Add a named extension object.

Syntax

public void AddExtensionObject (string namespaceUri, object extension)

Parameters

namespaceUri
Documentation for this section has not yet been entered.
extension
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

AddParameter Method

Add a named parameter.

Syntax

public void AddParameter (string name, string nsUri, object parameter)

Parameters

name
Documentation for this section has not yet been entered.
nsUri
Documentation for this section has not yet been entered.
parameter
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

Clear Method

Clears all extension objects and parameters.

Syntax

public void Clear ()

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

EnableDocumentFunction Property

Whether the document() function will be allowed.

Syntax

public bool EnableDocumentFunction { set; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

EnableScriptBlocks Property

Whether embedded script blocks will be allowed.

Syntax

public bool EnableScriptBlocks { set; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

Source Property

Set the source document to transform - must not be null.

Syntax

public Org.XmlUnit.ISource Source { set; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

Stylesheet Property

Set the stylesheet to use - may be null in which case an identity transformation will be performed.

Syntax

public Org.XmlUnit.ISource Stylesheet { set; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

TransformTo Method

Perform the transformation.

Syntax

public void TransformTo (System.IO.Stream stream)

Parameters

stream
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

TransformTo Method

Perform the transformation.

Syntax

public void TransformTo (System.IO.TextWriter writer)

Parameters

writer
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

TransformTo Method

Perform the transformation.

Syntax

public void TransformTo (System.Xml.XmlWriter writer)

Parameters

writer
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

TransformToDocument Method

Convenience method that returns the result of the transformation as a Document.

Syntax

public System.Xml.XmlDocument TransformToDocument ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

TransformToDocument Method

Convenience method that returns the result of the transformation as a Document.

Syntax

public System.Xml.XmlDocument TransformToDocument (System.Xml.XmlResolver resolver)

Parameters

resolver
resolver to use when loading the document

Returns

Documentation for this section has not yet been entered.

Remarks

since XMLUnit 2.6.0

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

TransformToString Method

Convenience method that returns the result of the transformation as a String.

Syntax

public string TransformToString ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

XmlResolver Property

Set the resolver to use for document() and xsl:include/import

Syntax

public System.Xml.XmlResolver XmlResolver { set; }

Value

Documentation for this section has not yet been entered.

Remarks

may be null in which case an empty XmlUrlResolver will be used.

Requirements

Namespace: Org.XmlUnit.Transform
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240