Skip to content

Commit 5bed23c

Browse files
committed
linter: verifying type name when type is schema-imported: fix last commit, we need to check the full list of bound namespace prefixes, not just the xsltPrefixes
1 parent e91d20a commit 5bed23c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/xsltTokenDiagnostics.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2045,10 +2045,10 @@ export class XsltTokenDiagnostics {
20452045
} else {
20462046
isValidType = FunctionData.schema.indexOf(tParts[1] + '#1') > -1;
20472047
}
2048-
} else {
2049-
// assume this is an imported XML Schema type
2050-
isValidType = true;
2051-
}
2048+
}
2049+
} else if (inheritedPrefixes.indexOf(tParts[0]) !== -1) {
2050+
// this namespace prefix is declared, assume this is an imported XML Schema type
2051+
isValidType = true;
20522052
}
20532053
}
20542054
if (!isValidType) {

0 commit comments

Comments
 (0)