UNPKG

1.74 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 parameter entity reference.
18 */
19export interface IXmlDtdParamEntityRefOptions {
20 /**
21 * The name of the entity to be referenced.
22 */
23 name: string;
24}
25/**
26 * Represents a parameter entity reference in a document type definition.
27 *
28 * A parameter entity reference is structured as follows, where `{entity}`
29 * is the name of the entity:
30 *
31 * ```xml
32 * %{entity};
33 * ```
34 */
35export default class XmlDtdParamEntityRef<Parent> {
36 private readonly _validation;
37 private readonly _parent;
38 private _name;
39 constructor(parent: Parent, validation: boolean, options: IXmlDtdParamEntityRefOptions);
40 /**
41 * Gets the name of this parameter entity reference.
42 */
43 get name(): string;
44 /**
45 * Sets the name of this parameter entity reference.
46 */
47 set name(name: string);
48 /**
49 * Returns an XML string representation of this parameter entity reference.
50 */
51 toString(): string;
52 /**
53 * Returns the parent of this parameter entity reference.
54 */
55 up(): Parent;
56}