Skip to content

Commit 98af2de

Browse files
Adding xhtml option to outputMethod. (#129)
1 parent d0253b0 commit 98af2de

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const xslt = new Xslt(options);
8989
- `cData` (`boolean`, default `true`): resolves CDATA elements in the output. Content under CDATA is resolved as text. This overrides `escape` for CDATA content.
9090
- `escape` (`boolean`, default `true`): replaces symbols like `<`, `>`, `&` and `"` by the corresponding [HTML/XML entities](https://www.tutorialspoint.com/xml/xml_character_entities.htm). Can be overridden by `disable-output-escaping`, that also does the opposite, unescaping `&gt;` and `&lt;` by `<` and `>`, respectively.
9191
- `selfClosingTags` (`boolean`, default `true`): Self-closes tags that don't have inner elements, if `true`. For instance, `<test></test>` becomes `<test />`.
92-
- `outputMethod` (`string`, default `xml`): Specifies the default output method. if `<xsl:output>` is declared in your XSLT file, this will be overridden.
92+
- `outputMethod` (`string`, default `xml`): Specifies the default output method. if `<xsl:output>` is declared in your XSLT file, this will be overridden. Valid values: `xml`, `html`, `text`, `name`, `xhtml`.
9393
- `parameters` (`array`, default `[]`): external parameters that you want to use.
9494
- `name`: the parameter name;
9595
- `namespaceUri` (optional): the namespace;

src/dom/xml-output-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ export type XmlOutputOptions = {
22
cData: boolean;
33
escape: boolean;
44
selfClosingTags: boolean;
5-
outputMethod: 'xml' | 'html' | 'text' | 'name'
5+
outputMethod: 'xml' | 'html' | 'text' | 'name' | 'xhtml';
66
}

src/xslt/xslt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class Xslt {
7373
decimalFormatSettings: XsltDecimalFormatSettings;
7474

7575
outputDocument: XDocument;
76-
outputMethod: 'xml' | 'html' | 'text' | 'name';
76+
outputMethod: 'xml' | 'html' | 'text' | 'name' | 'xhtml';
7777
outputOmitXmlDeclaration: string;
7878
version: string;
7979
firstTemplateRan: boolean;

0 commit comments

Comments
 (0)