XsltTextTools Class

Namespace
Kampute.DocToolkit.Xslt
Assembly
  • Kampute.DocToolkit.dll

Definition

Provides extension methods to assist in XSLT transformations for text content.
public class XsltTextTools
Inheritance

Remarks

This class defines extension methods that can be used within XSLT transformations to manipulate text content.

To use these extensions in an XSLT stylesheet, include the namespace declaration:

<xsl:stylesheet xmlns:txt="http://kampute.com/doc-tools/transform/text">
Then call the methods using the namespace prefix:
<xsl:value-of select="txt:NormalizeWhitespace(text())" />

Thread Safety

All public members of the type are guaranteed to be thread-safe.

Constructors

XsltTextTools()Initializes a new instance of the XsltTextTools class.

Fields

NamespaceUriThe namespace URI for the text manipulation extension methods.

Methods

NormalizeWhitespace(string)Replaces all sequences of whitespace characters with a single space, without trimming.
Replace(string, string, string)Replaces all occurrences of a specified string in the provided text with a new value.
Trim(string)Trims the white spaces from the provided text.
TrimEnd(string)Trims the trailing white spaces from the provided text.
TrimStart(string)Trims the leading white spaces from the provided text.