Skip to content

False error when constructing default namespace #120

@jperterm

Description

@jperterm

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions