Re: [MarkLogic Dev General] Can one declare optional external variables?

2012-09-13 Thread Ryan Dew
I believe you can do something like this:

declare variable $var1-external external;
declare variable $var1 := try {$var1-external} catch($e) {()};

I will be nice once XQuery 3.0 is supported because then you could have a
default value for external variables like so:

declare variable $var1-external external := ();

-Ryan Dew


2012/9/13 Geert Josten 

> Hi,
>
> Is it possible to declare an external variable in such a way that you can
> still call the .xqy directly, without specifying that variable?
>
> Kind regards,
> Geert
>
> M.Sc. G.P.H. (Geert) Josten
> Senior Developer
>
>
> Dayon B.V.
> Delftechpark 37b
> 2628 XJ Delft
> The Netherlands
>
> T +31 (0)88 26 82 570
>
> geert.jos...@dayon.nl
> www.dayon.nl
>
> De informatie - verzonden in of met dit e-mailbericht - is afkomstig van
> Dayon BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit
> bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan
> dit bericht kunnen geen rechten worden ontleend.
> ___
> General mailing list
> General@developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
>
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Can one declare optional external variables?

2012-09-13 Thread Geert Josten
Hi,

Is it possible to declare an external variable in such a way that you can
still call the .xqy directly, without specifying that variable?

Kind regards,
Geert

M.Sc. G.P.H. (Geert) Josten
Senior Developer


Dayon B.V.
Delftechpark 37b
2628 XJ Delft
The Netherlands

T +31 (0)88 26 82 570

geert.jos...@dayon.nl
www.dayon.nl

De informatie - verzonden in of met dit e-mailbericht - is afkomstig van
Dayon BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan
dit bericht kunnen geen rechten worden ontleend.
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general