From b023256a9325504bffaf33dbd5333a3d4d9057cc Mon Sep 17 00:00:00 2001 From: gorankarlic Date: Fri, 19 Apr 2024 15:49:06 +0800 Subject: [PATCH] Support a attribute list in xsl:use-attribute-sets Fixes false positive error where`xsl:use-attribute-sets` contains a space separated list of XSL attributes. --- src/xsltTokenDiagnostics.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xsltTokenDiagnostics.ts b/src/xsltTokenDiagnostics.ts index 3b83fe8..9758139 100644 --- a/src/xsltTokenDiagnostics.ts +++ b/src/xsltTokenDiagnostics.ts @@ -996,9 +996,9 @@ export class XsltTokenDiagnostics { hasProblem = true; } if (!hasProblem && attType === AttributeType.UseAttributeSets) { - if (globalAttributeSetNames.indexOf(variableName) < 0 && variableName !== 'xsl:original') { + if (variableName.split(/ +/).some((name) => globalAttributeSetNames.indexOf(name) < 0 && name !== 'xsl:original')) { token['error'] = ErrorType.AttributeSetUnresolved; - token.value = variableName; + token.value = variableName.split(/ +/).filter((name) => globalAttributeSetNames.indexOf(name) < 0); problemTokens.push(token); hasProblem = true; }