Either use Florent's workaround, or enable XQuery 1.1/3.0. To do this

(a) add "xquery version '3.0';" to the query prolog (or specify the equivalent option on the command line)

(b) use Saxon-PE or -EE 9.3

Michael Kay
Saxonica

On 04/12/2010 06:11, Malix Ren wrote:
Hi Michael,
I created the following XQuery function,

declare namespace xbrldi="http://xbrl.org/2006/xbrldi";
declare function mf:output-explicitMember( $dimName, $dimValue ) as element(){
    <xbrldi:explicitMember dimension="{$dimName}">
        {
        namespace {prefix-from-QName($dimName)} {namespace-uri-from-QName($dimName)},
        namespace {prefix-from-QName($dimValue)} {namespace-uri-from-QName($dimValue)},
        $dimValue
        }
    </xbrldi:explicitMember>
};

It raised an error message as:

Error on line 510 column 9
  XPST0003: XQuery syntax error in #... namespace {prefix-from-QName#:
    Namespace node constructors are not allowed in XQuery 1.0


Do you have any suggestions?

Thanks and best regards
Malix
------------------------------------------------------------------------------ What happens now with your Lotus Notes apps - do you make another costly upgrade, or settle for being marooned without product support? Time to move off Lotus Notes and onto the cloud with Force.com, apps are easier to build, use, and manage than apps on traditional platforms. Sign up for the Lotus Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/saxon-help