Donate Share

Saxon XSLT and XQuery Processor

Tracker: Bugs

7 xsl:element fails with dynamic name - ID: 641793
Last Update: Comment added ( mhkay )

The instruction:
<xsl:element name="{$x}"/>

fails if $x contains no namespace prefix.

The error message is "namespace prefix has not been
declared".

Applies to Saxon 7.3 only.

I have fixed the source code; this bug is sufficiently
severe that I will probably issue a patch release to
fix it.

Test case added: nspc42. (I was rather shocked to
discover that none of my existing test cases covered
this area.)

The fix adds the following code at the end of
net.sf.saxon.instruct.NamespaceContext#getURIforPrefix():

if (prefix.equals("") && useDefault) {
// use the "default default namespace" -
namely ""
return "";
} else {
return null;
}


Michael Kay ( mhkay ) - 2002-11-21 11:50

7

Closed

Fixed

Michael Kay

XSLT conformance

v7.3

Public


Comment ( 1 )

Date: 2002-12-10 15:45
Sender: mhkayProject Admin

Logged In: YES
user_id=251681

Fixed in 7.3.1


Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
close_date 2002-12-10 15:45 2002-12-10 15:45 mhkay
status_id Open 2002-12-10 15:45 mhkay
resolution_id None 2002-12-10 15:45 mhkay
close_date - 2002-12-10 15:45 mhkay