/
xml_tags.ts
38 lines (32 loc) 路 1.04 KB
/
xml_tags.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {TagContentType, TagDefinition} from './tags';
export class XmlTagDefinition implements TagDefinition {
closedByParent: boolean = false;
// TODO(issue/24571): remove '!'.
requiredParents!: {[key: string]: boolean};
// TODO(issue/24571): remove '!'.
parentToAdd!: string;
// TODO(issue/24571): remove '!'.
implicitNamespacePrefix!: string;
contentType: TagContentType = TagContentType.PARSABLE_DATA;
isVoid: boolean = false;
ignoreFirstLf: boolean = false;
canSelfClose: boolean = true;
preventNamespaceInheritance: boolean = false;
requireExtraParent(currentParent: string): boolean {
return false;
}
isClosedByChild(name: string): boolean {
return false;
}
}
const _TAG_DEFINITION = new XmlTagDefinition();
export function getXmlTagDefinition(tagName: string): XmlTagDefinition {
return _TAG_DEFINITION;
}