Skip to content

Commit

Permalink
fix for #73: Spurioius 'Invalid Name' problem reported in XPath for @…
Browse files Browse the repository at this point in the history
…*:data
  • Loading branch information
pgfearo committed Jun 11, 2021
1 parent 3d2ba91 commit c7de58f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
17 changes: 1 addition & 16 deletions sample/import-sat.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,6 @@
xmlns:fn="abc"
version="3.0">

<xsl:import href="sat.xsl"/>

<xsl:template match="pattern" mode="#default">
<xsl:call-template name="tp1h">
<xsl:with-param name="p1" as="element()" select="a"/>
<xsl:with-param name="p2" as="element()" select="b"/>
</xsl:call-template>

</xsl:template>

<xsl:template name="tp1h">
<xsl:param name="p1" as="node()"/>
<xsl:param name="p2" as="node()"/>

</xsl:template>

<xsl:variable name="test" select="@*:att"/>

</xsl:stylesheet>
2 changes: 1 addition & 1 deletion src/xsltTokenDiagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ export class XsltTokenDiagnostics {
skipValidation = token.value === '@xml';
if (!skipValidation && token.value === '@') {
let nextToken = allTokens.length > index + 1 ? allTokens[index + 1] : null;
skipValidation = nextToken ? token.value === '@' && nextToken.value === '*' : false;
skipValidation = nextToken ? token.value === '@' && (nextToken.value === '*' || nextToken.value === '*:') : false;
}
}
if (!skipValidation) {
Expand Down

0 comments on commit c7de58f

Please sign in to comment.