Content-Type: multipart/alternative; boundary="------------030905040201000802090106" --------------030905040201000802090106 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Michael, I am using 9.2.1.5 and patched it to use xquery functions in xpath. Though it seems that 9.3 has not adopted the patch I sent you a few weeks ago. It may take me a while to switch to 9.3 because the code changes are big. I am thinking about add namespace declaration to result element through xslt. XQuery => XdmValue => XSLT => final result or simply use XSLT to generate this result element I wanted. Thanks and best regards Malix On 12/4/2010 4:02 PM, Michael Kay wrote: > 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(){ >> >> { >> namespace {prefix-from-QName($dimName)} >> {namespace-uri-from-QName($dimName)}, >> namespace {prefix-from-QName($dimValue)} >> {namespace-uri-from-QName($dimValue)}, >> $dimValue >> } >> >> }; >> >> 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 > > > > ------------------------------------------------------------------------------ > 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 --------------030905040201000802090106 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Michael,
I am using 9.2.1.5 and patched it to use xquery functions in xpath.
Though it seems that 9.3 has not adopted the patch I sent you a few weeks ago.

It may take me a while to switch to 9.3 because the code changes are big.

I am thinking about add namespace declaration to result element through xslt.
XQuery => XdmValue => XSLT => final result
or simply use XSLT to generate this result element I wanted.

Thanks and best regards
Malix

On 12/4/2010 4:02 PM, Michael Kay wrote:
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


------------------------------------------------------------------------------ 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
--------------030905040201000802090106--