XmlDocTransformer Class

Namespace
Kampute.DocToolkit.XmlDoc
Assembly
  • Kampute.DocToolkit.dll

Definition

Extracts and formats the text content of XML documentation comments using XSLT style-sheets.
public class XmlDocTransformer : IXmlDocReferenceAccessor, IXmlDocTransformer
Inheritance
Implements
Inherited by

Remarks

The XmlDocTransformer class is responsible for extracting and formatting the content of XML documentation comments. The transformation process leverages XSLT (Extensible Stylesheet Language Transformations) to define the rules for converting XML documentation into the target format. This approach provides flexibility and maintainability since the transformation logic is separated from the code that processes the XML.

The ReferenceResolver property provides methods for resolving references within XML documentation, such as code references and language keywords. These methods are exposed within the XSLT transformation through the namespace URI http://kampute.com/doc-tools/transform/xml-doc.

Typically, you would use one of the derived classes like XmlDocToHtmlTransformer or XmlDocToMarkdownTransformer rather than using this class directly, unless you need to create a custom transformer for a specific output format.

Constructors

XmlDocTransformer(XslCompiledTransform)Initializes a new instance of the XmlDocTransformer class.

Fields

ResolverNamespaceUriThe namespace URI for the reference resolver extension methods in the XSLT transformation.

Properties

ReferenceResolverGets or sets the reference resolver for resolving references in XML documentation comments.

Methods

AddExtension(string, object)Adds an extension object to the XSLT transformation using the specified namespace URI as string.
Transform(TextWriter, XElement)Extracts and formats the content of the specified XML element and writes it to the specified text writer.