@markuplint/ml-spec 3.0.0-alpha.82 → 3.0.0-dev.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -3
- package/lib/dom-traverse/get-computed-aria-props.d.ts +12 -0
- package/lib/dom-traverse/get-computed-aria-props.js +106 -0
- package/lib/dom-traverse/get-computed-role.js +13 -25
- package/lib/dom-traverse/get-content-model.d.ts +3 -0
- package/lib/dom-traverse/get-content-model.js +28 -0
- package/lib/dom-traverse/get-explicit-role.js +1 -1
- package/lib/dom-traverse/get-spec.d.ts +2 -2
- package/lib/dom-traverse/get-spec.js +2 -2
- package/lib/dom-traverse/has-required-owned-elements.js +12 -0
- package/lib/dom-traverse/is-exposed.d.ts +11 -0
- package/lib/dom-traverse/is-exposed.js +181 -0
- package/lib/dom-traverse/may-be-focusable.d.ts +2 -0
- package/lib/dom-traverse/may-be-focusable.js +22 -0
- package/lib/index.d.ts +8 -1
- package/lib/index.js +8 -1
- package/lib/specs/content-model-category-to-tag-names.d.ts +2 -2
- package/lib/specs/content-model-category-to-tag-names.js +2 -2
- package/lib/specs/get-aria.js +3 -3
- package/lib/specs/get-attr-specs.d.ts +1 -1
- package/lib/specs/get-selectors-by-content-model-category.d.ts +1 -1
- package/lib/specs/get-spec-by-tag-name.d.ts +2 -2
- package/lib/specs/get-spec-by-tag-name.js +1 -1
- package/lib/specs/is-nothing-content-model.d.ts +5 -0
- package/lib/specs/is-nothing-content-model.js +12 -0
- package/lib/specs/is-palpable-elements.d.ts +5 -0
- package/lib/specs/is-palpable-elements.js +47 -0
- package/lib/specs/is-void-element.d.ts +1 -0
- package/lib/specs/is-void-element.js +25 -0
- package/lib/specs/schema-to-spec.d.ts +1 -1
- package/lib/specs/schema-to-spec.js +1 -1
- package/lib/types/aria.d.ts +10 -4
- package/lib/types/attributes.d.ts +94 -39
- package/lib/types/index.d.ts +27 -27
- package/lib/types/permitted-structres.d.ts +22 -28
- package/lib/types/permitted-structures.d.ts +54 -0
- package/lib/types/permitted-structures.js +8 -0
- package/lib/utils/get-ns.d.ts +2 -1
- package/lib/utils/get-ns.js +3 -0
- package/lib/utils/merge-array.d.ts +1 -1
- package/lib/utils/resolve-namespace.d.ts +4 -4
- package/lib/utils/resolve-namespace.js +18 -13
- package/package.json +7 -7
- package/schema.json +6 -6
- package/schemas/aria.schema.json +1 -1
- package/schemas/content-models.schema.json +33 -49
- package/src/dom-traverse/accname-computation.spec.ts +6 -6
- package/src/dom-traverse/get-computed-aria-props.spec.ts +368 -0
- package/src/dom-traverse/get-computed-aria-props.ts +130 -0
- package/src/dom-traverse/get-computed-role.spec.ts +1 -1
- package/src/dom-traverse/get-computed-role.ts +13 -25
- package/src/dom-traverse/get-content-model.ts +32 -0
- package/src/dom-traverse/get-explicit-role.ts +1 -1
- package/src/dom-traverse/get-spec.ts +3 -3
- package/src/dom-traverse/has-required-owned-elements.ts +13 -0
- package/src/dom-traverse/is-exposed.spec.ts +50 -0
- package/src/dom-traverse/is-exposed.ts +196 -0
- package/src/dom-traverse/may-be-focusable.ts +21 -0
- package/src/index.ts +8 -1
- package/src/specs/content-model-category-to-tag-names.ts +3 -3
- package/src/specs/get-aria.ts +3 -3
- package/src/specs/get-selectors-by-content-model-category.ts +1 -1
- package/src/specs/get-spec-by-tag-name.spec.ts +10 -10
- package/src/specs/get-spec-by-tag-name.ts +9 -5
- package/src/specs/is-nothing-content-model.ts +9 -0
- package/src/specs/is-palpable-elements.ts +55 -0
- package/src/specs/is-void-element.ts +22 -0
- package/src/specs/schema-to-spec.ts +1 -1
- package/src/types/aria.ts +7 -1
- package/src/types/attributes.ts +227 -121
- package/src/types/index.ts +8 -8
- package/src/types/permitted-structres.ts +24 -32
- package/src/types/permitted-structures.ts +96 -0
- package/src/utils/get-ns.ts +6 -1
- package/src/utils/resolve-namespace.spec.ts +37 -0
- package/src/utils/resolve-namespace.ts +22 -18
- package/tsconfig.tsbuildinfo +1 -1
- package/lib/dom-traverse/focusability-computation.d.ts +0 -1
- package/lib/dom-traverse/focusability-computation.js +0 -8
- package/lib/dom-traverse/get-aria.d.ts +0 -9
- package/lib/dom-traverse/get-aria.js +0 -54
- package/lib/specs/aria-spec.d.ts +0 -5
- package/lib/specs/aria-spec.js +0 -12
- package/lib/specs/get-spec.d.ts +0 -13
- package/lib/specs/get-spec.js +0 -85
- package/lib/specs/html-spec.d.ts +0 -6
- package/lib/specs/html-spec.js +0 -16
- package/lib/specs/resolve-namespace.d.ts +0 -9
- package/lib/specs/resolve-namespace.js +0 -26
- package/lib/utils.d.ts +0 -8
- package/lib/utils.js +0 -50
package/src/types/index.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ARIA } from './aria';
|
|
2
2
|
import type { AttributeJSON, AttributeType, GlobalAttributes } from './attributes';
|
|
3
|
-
import type { ContentModel, Category } from './permitted-
|
|
3
|
+
import type { ContentModel, Category } from './permitted-structures';
|
|
4
4
|
import type { NamespaceURI } from '@markuplint/ml-ast';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* markuplint Markup-language spec
|
|
8
8
|
*/
|
|
9
9
|
export interface MLMLSpec {
|
|
10
10
|
cites: Cites;
|
|
@@ -97,7 +97,7 @@ export type ElementSpec = {
|
|
|
97
97
|
nonStandard?: true;
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
|
-
* Element
|
|
100
|
+
* Element categories
|
|
101
101
|
*/
|
|
102
102
|
categories: Category[];
|
|
103
103
|
|
|
@@ -107,9 +107,9 @@ export type ElementSpec = {
|
|
|
107
107
|
contentModel: ContentModel;
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
|
-
* Tag
|
|
110
|
+
* Tag omission
|
|
111
111
|
*/
|
|
112
|
-
|
|
112
|
+
omission: ElementSpecOmission;
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* Global Attributes
|
|
@@ -122,7 +122,7 @@ export type ElementSpec = {
|
|
|
122
122
|
attributes: Record<string, Attribute>;
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
|
-
* WAI-ARIA role and
|
|
125
|
+
* WAI-ARIA role and properties
|
|
126
126
|
*/
|
|
127
127
|
aria: ARIA;
|
|
128
128
|
|
|
@@ -137,9 +137,9 @@ export type ElementSpec = {
|
|
|
137
137
|
possibleToAddProperties?: true;
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
-
type
|
|
140
|
+
type ElementSpecOmission = false | ElementSpecOmissionTags;
|
|
141
141
|
|
|
142
|
-
type
|
|
142
|
+
type ElementSpecOmissionTags = {
|
|
143
143
|
startTag: boolean | ElementCondition;
|
|
144
144
|
endTag: boolean | ElementCondition;
|
|
145
145
|
};
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* and run json-schema-to-typescript to regenerate this file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
export type
|
|
8
|
+
export type PermittedContentPattern =
|
|
9
9
|
| PermittedContentRequire
|
|
10
10
|
| PermittedContentOptional
|
|
11
11
|
| PermittedContentOneOrMore
|
|
12
12
|
| PermittedContentZeroOrMore
|
|
13
13
|
| PermittedContentChoice
|
|
14
|
-
|
|
|
15
|
-
export type
|
|
14
|
+
| PermittedContentTransparent;
|
|
15
|
+
export type Model = ContentType | ContentType[];
|
|
16
16
|
export type ContentType = string | Category;
|
|
17
17
|
export type Category =
|
|
18
18
|
| '#text'
|
|
@@ -22,7 +22,6 @@ export type Category =
|
|
|
22
22
|
| '#heading'
|
|
23
23
|
| '#sectioning'
|
|
24
24
|
| '#metadata'
|
|
25
|
-
| '#transparent'
|
|
26
25
|
| '#embedded'
|
|
27
26
|
| '#palpable'
|
|
28
27
|
| '#script-supporting'
|
|
@@ -44,65 +43,58 @@ export type Category =
|
|
|
44
43
|
| '#SVGStructural'
|
|
45
44
|
| '#SVGStructurallyExternal'
|
|
46
45
|
| '#SVGTextContent'
|
|
47
|
-
| '#SVGTextContentChild'
|
|
48
|
-
| '#SVGOtherXMLNamespace';
|
|
49
|
-
export type PermittedContentSpec = PermittedContent[];
|
|
46
|
+
| '#SVGTextContentChild';
|
|
50
47
|
|
|
51
48
|
export interface ContentModelsSchema {
|
|
52
49
|
__contentModel?: ContentModel;
|
|
53
50
|
}
|
|
54
51
|
export interface ContentModel {
|
|
55
|
-
contents:
|
|
52
|
+
contents: PermittedContentPattern[] | boolean;
|
|
56
53
|
descendantOf?: string;
|
|
57
54
|
conditional?: {
|
|
58
55
|
condition: string;
|
|
59
|
-
contents:
|
|
56
|
+
contents: PermittedContentPattern[] | boolean;
|
|
60
57
|
}[];
|
|
61
58
|
}
|
|
62
59
|
export interface PermittedContentRequire {
|
|
63
|
-
require:
|
|
64
|
-
ignore?: Target;
|
|
65
|
-
notAllowedDescendants?: ContentType[];
|
|
60
|
+
require: Model;
|
|
66
61
|
max?: number;
|
|
67
62
|
min?: number;
|
|
68
63
|
_TODO_?: string;
|
|
69
64
|
}
|
|
70
65
|
export interface PermittedContentOptional {
|
|
71
|
-
optional:
|
|
72
|
-
ignore?: Target;
|
|
73
|
-
notAllowedDescendants?: ContentType[];
|
|
66
|
+
optional: Model;
|
|
74
67
|
max?: number;
|
|
75
68
|
_TODO_?: string;
|
|
76
69
|
}
|
|
77
70
|
export interface PermittedContentOneOrMore {
|
|
78
|
-
oneOrMore:
|
|
79
|
-
ignore?: Target;
|
|
80
|
-
notAllowedDescendants?: ContentType[];
|
|
71
|
+
oneOrMore: Model | PermittedContentPattern[];
|
|
81
72
|
max?: number;
|
|
82
73
|
_TODO_?: string;
|
|
83
74
|
}
|
|
84
75
|
export interface PermittedContentZeroOrMore {
|
|
85
|
-
zeroOrMore:
|
|
86
|
-
ignore?: Target;
|
|
87
|
-
notAllowedDescendants?: ContentType[];
|
|
76
|
+
zeroOrMore: Model | PermittedContentPattern[];
|
|
88
77
|
max?: number;
|
|
89
78
|
_TODO_?: string;
|
|
90
79
|
}
|
|
91
80
|
export interface PermittedContentChoice {
|
|
81
|
+
/**
|
|
82
|
+
* @minItems 2
|
|
83
|
+
* @maxItems 5
|
|
84
|
+
*/
|
|
92
85
|
choice:
|
|
93
|
-
| [
|
|
94
|
-
| [
|
|
95
|
-
| [
|
|
86
|
+
| [PermittedContentPattern[], PermittedContentPattern[]]
|
|
87
|
+
| [PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[]]
|
|
88
|
+
| [PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[]]
|
|
96
89
|
| [
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
90
|
+
PermittedContentPattern[],
|
|
91
|
+
PermittedContentPattern[],
|
|
92
|
+
PermittedContentPattern[],
|
|
93
|
+
PermittedContentPattern[],
|
|
94
|
+
PermittedContentPattern[],
|
|
102
95
|
];
|
|
103
96
|
_TODO_?: string;
|
|
104
97
|
}
|
|
105
|
-
export interface
|
|
106
|
-
|
|
107
|
-
_TODO_?: string;
|
|
98
|
+
export interface PermittedContentTransparent {
|
|
99
|
+
transparent: string;
|
|
108
100
|
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type PermittedContentPattern =
|
|
9
|
+
| PermittedContentRequire
|
|
10
|
+
| PermittedContentOptional
|
|
11
|
+
| PermittedContentOneOrMore
|
|
12
|
+
| PermittedContentZeroOrMore
|
|
13
|
+
| PermittedContentChoice
|
|
14
|
+
| PermittedContentTransparent;
|
|
15
|
+
export type Model = ContentType | ContentType[];
|
|
16
|
+
export type ContentType = string | Category;
|
|
17
|
+
export type Category =
|
|
18
|
+
| '#text'
|
|
19
|
+
| '#phrasing'
|
|
20
|
+
| '#flow'
|
|
21
|
+
| '#interactive'
|
|
22
|
+
| '#heading'
|
|
23
|
+
| '#sectioning'
|
|
24
|
+
| '#metadata'
|
|
25
|
+
| '#embedded'
|
|
26
|
+
| '#palpable'
|
|
27
|
+
| '#script-supporting'
|
|
28
|
+
| '#SVGAnimation'
|
|
29
|
+
| '#SVGBasicShapes'
|
|
30
|
+
| '#SVGContainer'
|
|
31
|
+
| '#SVGDescriptive'
|
|
32
|
+
| '#SVGFilterPrimitive'
|
|
33
|
+
| '#SVGFont'
|
|
34
|
+
| '#SVGGradient'
|
|
35
|
+
| '#SVGGraphics'
|
|
36
|
+
| '#SVGGraphicsReferencing'
|
|
37
|
+
| '#SVGLightSource'
|
|
38
|
+
| '#SVGNeverRendered'
|
|
39
|
+
| '#SVGNone'
|
|
40
|
+
| '#SVGPaintServer'
|
|
41
|
+
| '#SVGRenderable'
|
|
42
|
+
| '#SVGShape'
|
|
43
|
+
| '#SVGStructural'
|
|
44
|
+
| '#SVGStructurallyExternal'
|
|
45
|
+
| '#SVGTextContent'
|
|
46
|
+
| '#SVGTextContentChild';
|
|
47
|
+
|
|
48
|
+
export interface ContentModelsSchema {
|
|
49
|
+
__contentModel?: ContentModel;
|
|
50
|
+
}
|
|
51
|
+
export interface ContentModel {
|
|
52
|
+
contents: PermittedContentPattern[] | boolean;
|
|
53
|
+
descendantOf?: string;
|
|
54
|
+
conditional?: {
|
|
55
|
+
condition: string;
|
|
56
|
+
contents: PermittedContentPattern[] | boolean;
|
|
57
|
+
}[];
|
|
58
|
+
}
|
|
59
|
+
export interface PermittedContentRequire {
|
|
60
|
+
require: Model;
|
|
61
|
+
max?: number;
|
|
62
|
+
min?: number;
|
|
63
|
+
_TODO_?: string;
|
|
64
|
+
}
|
|
65
|
+
export interface PermittedContentOptional {
|
|
66
|
+
optional: Model;
|
|
67
|
+
max?: number;
|
|
68
|
+
_TODO_?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface PermittedContentOneOrMore {
|
|
71
|
+
oneOrMore: Model | PermittedContentPattern[];
|
|
72
|
+
max?: number;
|
|
73
|
+
_TODO_?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface PermittedContentZeroOrMore {
|
|
76
|
+
zeroOrMore: Model | PermittedContentPattern[];
|
|
77
|
+
max?: number;
|
|
78
|
+
_TODO_?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface PermittedContentChoice {
|
|
81
|
+
choice:
|
|
82
|
+
| [PermittedContentPattern[], PermittedContentPattern[]]
|
|
83
|
+
| [PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[]]
|
|
84
|
+
| [PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[]]
|
|
85
|
+
| [
|
|
86
|
+
PermittedContentPattern[],
|
|
87
|
+
PermittedContentPattern[],
|
|
88
|
+
PermittedContentPattern[],
|
|
89
|
+
PermittedContentPattern[],
|
|
90
|
+
PermittedContentPattern[],
|
|
91
|
+
];
|
|
92
|
+
_TODO_?: string;
|
|
93
|
+
}
|
|
94
|
+
export interface PermittedContentTransparent {
|
|
95
|
+
transparent: string;
|
|
96
|
+
}
|
package/src/utils/get-ns.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Namespace } from '@markuplint/ml-ast';
|
|
2
|
+
|
|
3
|
+
export function getNS(namespaceURI: string | null): Namespace {
|
|
2
4
|
switch (namespaceURI) {
|
|
3
5
|
case 'http://www.w3.org/2000/svg': {
|
|
4
6
|
return 'svg';
|
|
@@ -6,6 +8,9 @@ export function getNS(namespaceURI: string | null) {
|
|
|
6
8
|
case 'http://www.w3.org/1998/Math/MathML': {
|
|
7
9
|
return 'mml';
|
|
8
10
|
}
|
|
11
|
+
case 'http://www.w3.org/1999/xlink': {
|
|
12
|
+
return 'xlink';
|
|
13
|
+
}
|
|
9
14
|
default: {
|
|
10
15
|
return 'html';
|
|
11
16
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { resolveNamespace } from './resolve-namespace';
|
|
2
|
+
|
|
3
|
+
test('tag', () => {
|
|
4
|
+
expect(resolveNamespace('a')).toStrictEqual({
|
|
5
|
+
localName: 'a',
|
|
6
|
+
localNameWithNS: 'a',
|
|
7
|
+
namespace: 'html',
|
|
8
|
+
namespaceURI: 'http://www.w3.org/1999/xhtml',
|
|
9
|
+
});
|
|
10
|
+
expect(resolveNamespace('svg:a')).toStrictEqual({
|
|
11
|
+
localName: 'a',
|
|
12
|
+
localNameWithNS: 'svg:a',
|
|
13
|
+
namespace: 'svg',
|
|
14
|
+
namespaceURI: 'http://www.w3.org/2000/svg',
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test('attr', () => {
|
|
19
|
+
expect(resolveNamespace('href', 'http://www.w3.org/1999/xhtml')).toStrictEqual({
|
|
20
|
+
localName: 'href',
|
|
21
|
+
localNameWithNS: 'href',
|
|
22
|
+
namespace: 'html',
|
|
23
|
+
namespaceURI: 'http://www.w3.org/1999/xhtml',
|
|
24
|
+
});
|
|
25
|
+
expect(resolveNamespace('href', 'http://www.w3.org/2000/svg')).toStrictEqual({
|
|
26
|
+
localName: 'href',
|
|
27
|
+
localNameWithNS: 'svg:href',
|
|
28
|
+
namespace: 'svg',
|
|
29
|
+
namespaceURI: 'http://www.w3.org/2000/svg',
|
|
30
|
+
});
|
|
31
|
+
expect(resolveNamespace('xlink:href', 'http://www.w3.org/2000/svg')).toStrictEqual({
|
|
32
|
+
localName: 'href',
|
|
33
|
+
localNameWithNS: 'xlink:href',
|
|
34
|
+
namespace: 'xlink',
|
|
35
|
+
namespaceURI: 'http://www.w3.org/1999/xlink',
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NamespaceURI } from '@markuplint/ml-ast';
|
|
1
|
+
import type { NamespaceURI, Namespace } from '@markuplint/ml-ast';
|
|
2
2
|
|
|
3
3
|
import { getNS } from './get-ns';
|
|
4
4
|
|
|
@@ -7,30 +7,34 @@ const cache = new Map<string, NamespacedElementName>();
|
|
|
7
7
|
type NamespacedElementName = {
|
|
8
8
|
localNameWithNS: string;
|
|
9
9
|
localName: string;
|
|
10
|
-
namespace:
|
|
10
|
+
namespace: Namespace;
|
|
11
11
|
namespaceURI: NamespaceURI;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
const namespaceURIMap: Record<Namespace, NamespaceURI> = {
|
|
15
|
+
html: 'http://www.w3.org/1999/xhtml',
|
|
16
|
+
svg: 'http://www.w3.org/2000/svg',
|
|
17
|
+
mml: 'http://www.w3.org/1998/Math/MathML',
|
|
18
|
+
xlink: 'http://www.w3.org/1999/xlink',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export function resolveNamespace(name: string, namespaceURI: string | null = 'http://www.w3.org/1999/xhtml') {
|
|
22
|
+
const cached = cache.get(name + namespaceURI);
|
|
16
23
|
if (cached) {
|
|
17
24
|
return cached;
|
|
18
25
|
}
|
|
19
|
-
const
|
|
20
|
-
const
|
|
26
|
+
const [_explicitNS, _localName] = name.split(':');
|
|
27
|
+
const explicitNS = _localName ? _explicitNS : null;
|
|
28
|
+
const localName = _localName ?? _explicitNS;
|
|
29
|
+
const namespace =
|
|
30
|
+
(['html', 'svg', 'mml', 'xlink'] as const).find(_ns => _ns === (explicitNS || getNS(namespaceURI || null))) ||
|
|
31
|
+
'html';
|
|
21
32
|
const result: NamespacedElementName = {
|
|
22
|
-
localNameWithNS: `${
|
|
23
|
-
localName
|
|
24
|
-
namespace
|
|
25
|
-
namespaceURI:
|
|
26
|
-
(
|
|
27
|
-
[
|
|
28
|
-
'http://www.w3.org/1999/xhtml',
|
|
29
|
-
'http://www.w3.org/2000/svg',
|
|
30
|
-
'http://www.w3.org/1998/Math/MathML',
|
|
31
|
-
] as const
|
|
32
|
-
).find(ns => ns === namespaceURI) || 'http://www.w3.org/1999/xhtml',
|
|
33
|
+
localNameWithNS: `${namespace === 'html' ? '' : `${namespace}:`}${localName}`,
|
|
34
|
+
localName,
|
|
35
|
+
namespace,
|
|
36
|
+
namespaceURI: namespaceURIMap[namespace],
|
|
33
37
|
};
|
|
34
|
-
cache.set(
|
|
38
|
+
cache.set(name + namespaceURI, result);
|
|
35
39
|
return result;
|
|
36
40
|
}
|