Skip to content

Commit a2c29b8

Browse files
committed
linter: 1. don't report error for special saxon extension types prefixed with '~' character
2. don't report error for 'xs:anyAtomicType' - it doesn't have a constructor
1 parent e6f3ac2 commit a2c29b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/xsltTokenDiagnostics.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,7 @@ export class XsltTokenDiagnostics {
20232023
let tValue = token.value;
20242024
let tParts = tValue.split(':');
20252025
let isValidType = false;
2026-
if (tValue === '*' || tValue === '?' || tValue === '+') {
2026+
if (tValue === '*' || tValue === '?' || tValue === '+' || tValue.startsWith('~')) {
20272027
// e.g. xs:integer* don't check name
20282028
isValidType = true;
20292029
} else if (tParts.length === 1) {
@@ -2039,7 +2039,8 @@ export class XsltTokenDiagnostics {
20392039
let nsType = xsltPrefixesToURIs.get(tParts[0]);
20402040
if (nsType !== undefined) {
20412041
if (nsType === XSLTnamespaces.XMLSchema) {
2042-
if (tParts[1] === 'numeric') {
2042+
const part2 = tParts[1];
2043+
if (part2 === 'numeric' || part2 === 'anyAtomicType') {
20432044
isValidType = true;
20442045
} else {
20452046
isValidType = FunctionData.schema.indexOf(tParts[1] + '#1') > -1;

0 commit comments

Comments
 (0)