xsl-list
[Top] [All Lists]

Re: [xsl] An untyped atomic value cannot be converted to a QName ...

2016-01-04 14:30:25
Hi Roger,

Maybe by using xsl:sequence instead of xsl:value-of which always creates a 
string.

- Michael

Am 04.01.2016 um 21:16 schrieb Costello, Roger L. 
costello(_at_)mitre(_dot_)org 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com>:

Hi Folks,

For xsl:value-of in the below function I am getting this error message:

   An untyped atomic value cannot be converted to a QName or NOTATION 
   as required for the result of function f:QName-for-local-name()

Why am I getting that error message? 

There are no "untyped atomic values" in xsl:value-of: the argument to 
fn:QName, $local-name, clearly has a type -- xs:string. 

How do I fix it?

-----------------------------------------------------------
   <xsl:function name="f:QName-for-local-name" as="xs:QName">
       <xsl:param name="local-name" as="xs:string" />
       <xsl:param name="schema" as="element(xs:schema)" />

       <xsl:value-of select="QName((), $local-name)"/>

   </xsl:function>
-----------------------------------------------------------

/Roger
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>