Yes, this is definitely a bug. I'm thinking about how best to fix it.
Note however that the spec is not exactly the way you imagine it.
What should happen is that the xs:QName value passed in $elementName is converted to a string. This string is in the form of a lexical QName (prefix:localname). Because you specified the namespace attribute, the prefix part of the lexical QName should be used as the suggested prefix for the constructed element.


Michael Kay

From: Jan Kovařík []
Sent: 07 September 2009 11:52
Subject: [saxon] version 9.2 bug?


im trying new Saxon-HE version and im getting error: Required item type of @name attribute of element is xs:string; supplied value has item type xs:QName(in saxon-B it was ok).
In this function:
<xsl:function name="functx:wrap-values-in-elements" as="element()*"
              xmlns:functx="" >
  <xsl:param name="values" as="xs:anyAtomicType*"/>
  <xsl:param name="elementName" as="xs:QName"/>
   <xsl:for-each select="$values">
     <xsl:element name="{$elementName}"
       <xsl:sequence select="."/>

i Was looking to w3c recommendation and i saw there, that Qname is ok. So am I missing something?
  name = { qname }
  namespace = { uri-reference }
  use-attribute-sets = qnames>
  <!-- Content: template -->

thank you for your help.