libxslt-wasm
Version:
JavaScript bindings for libxslt compiled to WebAssembly
27 lines (26 loc) • 1.33 kB
TypeScript
import { XmlDocument, type XmlDocumentBaseOptions } from "./XmlDocument.ts";
import { XmlOutputBuffer } from "./XmlOutputBuffer.ts";
declare class XsltStylesheet extends XmlDocument {
/**
* Assuming the XML document is a valid XSLT stylesheet, creates a new
* instance of XsltStylesheet
*/
static fromXmlDocument(xmlDocument: XmlDocument): Promise<XsltStylesheet>;
/**
* Given an XML document with an embedded XSLT stylesheet (e.g. a processing
* instruction like <?xml-stylesheet?>), return the corresponding
* XsltStylesheet instance
*/
static fromEmbeddedXmlDocument(xmlDocument: XmlDocument): Promise<XsltStylesheet | null>;
static fromUrl(fileOrUrl: string): Promise<XsltStylesheet>;
static fromString(string: string): Promise<XsltStylesheet>;
static fromBuffer(buffer: ArrayBufferLike, options: Parameters<typeof this.from>[1]): Promise<XsltStylesheet>;
static from(buffer: Uint8Array, { url, encoding, options }?: XmlDocumentBaseOptions & {
url?: string;
}): Promise<XsltStylesheet>;
apply(xmlDocument: XmlDocument, params?: Record<string, string>): Promise<XmlDocument>;
applyToOutputBuffer(xmlDocument: XmlDocument): XmlOutputBuffer;
applyToString(xmlDocument: XmlDocument): string;
delete(): void;
}
export { XsltStylesheet };