|
Subject: Aw: [xsl] xslt 2.0, 3.0 attribute 'match' question From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sun, 22 Feb 2026 09:56:49 -0000 |
It seems to be a match on an element with any namespace but the literal NCName/local name 'element', why should that match an element with the local name 'd'? It is not a node kind test. -- Gesendet mit der GMX Mail App Am 22.02.26, 10:15 schrieb "Mukul Gandhi mukulg@xxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>: Dear xsl-list, There's following XSLT test case (attr/match, test case name match-036 with <spec value="XSLT20+"/>) within W3C XSLT 3.0 test suite. XML document: <?xml version="1.0"?> <doc xmlns:a="http://a.com/" xmlns:b="http://b.com/" xmlns:c="http://c.com/" xmlns:d="http://d.com/"> <a:element a:attribute="1"> <b:element b:attribute="2"> <c:element c:attribute="3"> <d> <element attribute="4"/> </d> </c:element> </b:element> </a:element> </doc> XSLT document: (I've added, <xsl:output method="xml" indent="yes"/> to produce indented XML transform result that help with discussion) <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transf orm" version="2.0"> <xsl:strip-space elements="foo"/> <xsl:output method="xml" indent="yes"/> <xsl:template match="doc"> <out> <xsl:apply-templates/> </out> </xsl:template> <xsl:template match="*:element"> [<xsl:value-of select="name()"/>} <xsl:apply-templates select="@*"/> <xsl:apply-templates/> </xsl:template> <xsl:template match="@*:attribute"> (@<xsl:value-of select="name()"/>) </xsl:template> </xsl:stylesheet> Using Saxon HE 12.9, we get following XSL transform result for this test case, <?xml version="1.0" encoding="UTF-8"?> <out> [a:element} (@a:attribute) [b:element} (@b:attribute) [c:element} (@c:attribute) [element} (@attribute) </out> Whe reas, Xalan XSLT 3.0 development code, produces following XSL transform result for this test case, <?xml version="1.0" encoding="UTF-8"?> <out> [a:element} (@a:attribute) [b:element} (@b:attribute) [c:element} (@c:attribute) [d} [element} (@attribute) </out> I think that, Xalan XSLT 3.0 development code, is producing correct result for this test case. Saxon is missing [d} within an XSL transform result for this test case. Thanks in advance, for any insights to discuss this XSL transform example. -- Regards, Mukul Gandhi XSL-List info and archiveEasyUnsubscribe (by email) XSL-List info and archiveEasyUnsubscribe (by email)
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] xslt 2.0, 3.0 attribute 'matc, Mukul Gandhi mukulg@ | Thread | Re: [xsl] xslt 2.0, 3.0 attribute , Mukul Gandhi mukulg@ |
| [xsl] xslt 2.0, 3.0 attribute 'matc, Mukul Gandhi mukulg@ | Date | Re: [xsl] xslt 2.0, 3.0 attribute , Mukul Gandhi mukulg@ |
| Month |