You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
xsl:attribute with an attribute without a prefix should always be created in the null namespace #5
If the namespace attribute is not present, then the lexical QName is expanded into an expanded QName using the namespace declarations in effect for the xsl:attribute element, not including any default namespace declaration.
Minimal repro:
import{compile}from"../src/compile";import*asslimdomfrom"slimdom";import{evaluateXPathToNodes}from"fontoxpath";test("xsl:attribute unprefixed name gets no namespace even with default namespace in scope",async()=>{constxslt=slimdom.parseXmlDocument(` <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:template match="/"> <xsl:element name="p"> <xsl:attribute name="class">foo</xsl:attribute> </xsl:element> </xsl:template> </xsl:stylesheet>`);consttransform=awaitcompile(xslt);constresult=transform(slimdom.parseXmlDocument("<root/>")).get("#default").document;constp=evaluateXPathToNodes("/p",result)[0]asslimdom.Element;expect(p.getAttribute("class")).toEqual("foo");expect(p.getAttributeNS("http://www.w3.org/1999/xhtml","class")).toBeNull();});
Activity
egh commentedon Jun 10, 2026
Fixed!