Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False error when constructing default namespace #120

Closed
jperterm opened this issue Feb 24, 2023 · 1 comment
Closed

False error when constructing default namespace #120

jperterm opened this issue Feb 24, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jperterm
Copy link

According to the XSLT (3.0) spec <xsl:namespace> requires a name attribute, but its value can be zero-length effectively to create a default namespace node.

The following XSLT causes the false error XSLT: Invalid XSLT name: '' for the case described:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="#all" version="3.0">
    <xsl:template match="/*" mode="#all">
        <element>
            <xsl:namespace name="" select="'urn:default-namespace'"/>
        </element>
    </xsl:template>
</xsl:stylesheet>
@pgfearo pgfearo added the bug Something isn't working label Feb 24, 2023
pgfearo added a commit that referenced this issue Feb 24, 2023
@pgfearo
Copy link
Member

pgfearo commented Feb 24, 2023

Thanks for reporting this problem. The linter was treating the name attribute of xsl:namespace the same as for other XSLT instructions where name must have a non-empty string value.

The issue has been fixed and is in the latest release: 1.5.8.

@pgfearo pgfearo closed this as completed Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants