UNPKG

1.69 kBTypeScriptView Raw
1/**
2 * Copyright (C) 2016-2019 Michael Kourlas
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16/**
17 * The options used to create a new notation declaration.
18 */
19export interface IXmlDtdNotationOptions {
20 /**
21 * The text of the declaration.
22 */
23 charData: string;
24}
25/**
26 * Represents a notation declaration in a document type definition.
27 *
28 * A notation declaration is structured as follows, where `{text}` is the
29 * text of the declaration:
30 *
31 * ```xml
32 * <!NOTATION {text}>
33 * ```
34 */
35export default class XmlDtdNotation<Parent> {
36 private readonly _validation;
37 private readonly _parent;
38 private _charData;
39 constructor(parent: Parent, validation: boolean, options: IXmlDtdNotationOptions);
40 /**
41 * Gets the text of this notation declaration.
42 */
43 get charData(): string;
44 /**
45 * Sets the text of this notation declaration.
46 */
47 set charData(charData: string);
48 /**
49 * Returns an XML string representation of this notation declaration.
50 */
51 toString(): string;
52 /**
53 * Returns the parent of this notation declaration.
54 */
55 up(): Parent;
56}