import module namespace mod = "http://www.grupo-siva.org/2003/ModuloFunciones"
at "file://d:\cofelu\xquery\ModuloFunciones\Modulo.xquery";
(:***************************************************************
* *
* NOMBRE: obtenerListadoHechosDocumentos.xquery *
* *
* DESCRIPCIÓN: Consulta que recupera todas los identificadores *
* de hechos marcados distintas que interienen en los documentos *
* *
***************************************************************:)
<Hechos numero="{count(distinct-values(for $documento in doc("D:\cofelu\Resultados\estructuras-sintesis\Hechos\Documentos.xml")//archivo
for $hecho in doc($documento)//fich:hc/@id
return $hecho))}">
{
let $hechos := distinct-values(for $documento in doc("D:\cofelu\Resultados\estructuras-sintesis\Hechos\Documentos.xml")//archivo
for $hecho in doc($documento)//fich:hc/@id
return $hecho)
for $hecho in $hechos
return
<hecho id ="{string($hecho)}">
{ for $doc-hecho in doc("D:\cofelu\Resultados\estructuras-sintesis\Hechos\Documentos.xml")//archivo
let $a := concat(doc($doc-hecho)//tmp:ayo,doc($doc-hecho)//tmp:mes,doc($doc-hecho)//tmp:dia)
where doc($doc-hecho)//fich:hc[string(@id)=string($hecho)]
order by $a
return
<documento ayo="{string($a)}">
{$doc-hecho}
</documento>
}
</hecho>
Subject:Re: STYLUSXQL Author:(Deleted User) Date:27 Jun 2004 02:30 PM
Hi Antonio,
which version of Stylus are you using?
Alberto
At 07.49 26/06/2004 -0400, stylus-studio-xquery Listmanager wrote:
>From: "Antonio Calvo" <acalvo@uco.es>
>
>Hi,
>
>This xquery works correctly in stylusstudio program, but when I am working
> at stylusXql give de next error:
>
>Processing D:\cofelu\xquery\Hechos\ObtenerClavesHechos.xquery...
>Error (file , line 22, column 24): The datatype {}CDATA is unknown
>
>the problem is tha stylusXql does not work with distintc-values function?
>
>I will be very please if somebody could help me.
Subject:Re: STYLUSXQL Author:Antonio Calvo Date:28 Jun 2004 05:09 AM
Ok. Alberto.
I was using 5.1.
Now I am working with 5.3 179g. The problem has disappeared and
the query works correctly. The problem now is that no output file
save at the disk and the result only apear at the screen of
ms-dos.
Subject:Re: STYLUSXQL Author:(Deleted User) Date:28 Jun 2004 12:59 PM
Hi Antonio,
At 05.12 28/06/2004 -0400, stylus-studio-xquery Listmanager wrote:
>From: "Antonio Calvo" <acalvo@uco.es>
>
>[..]
>Now I am working with 5.3 179g. The problem has disappeared and
>the query works correctly. The problem now is that no output file
>save at the disk and the result only apear at the screen of
>ms-dos.
The syntax for the command line has changed, to be aligned with the XSLT
command line processor: now it's
usage: StylusXql [-in <input XML file>] [-out <output file>] [-param
name=value]*
[-i] [-debug host[:port]] <XQuery file>
-in: XML document to be used as current context
-out: file where the query result will be written (default is stdout)
-param: assign a value to external variables
-i: indent the XML output
-debug: debug the query using the provided debug server
So, to write the result to a file, you now need to add "-out result.txt"
Subject:Re: STYLUSXQL Author:(Deleted User) Date:29 Jun 2004 08:45 AM
At 04.01 29/06/2004 -0400, stylus-studio-xquery Listmanager wrote:
>From: "Antonio Calvo" <acalvo@uco.es>
>
>Thanks Alberto. Now my program with stylusXql works very well. The
>use of paramater is very interesting. This is my first experience:
>
>
>declare variable $para external;
>
><Hechos>
> {$para}
></Hechos>
>
>When I work with stylusStudio program it is correct, but with
>stylusXql using this call from ms-dos:
>
>StylusXql prueba.xquery -param para="cerco-barcelona" it is
>does not works and give de next message error:
>
>StylusXql prueba.xquery -param para="cerco-barcelona"
>
>Error while evaluating external variable para Error: An attempt
>was made to perform an axis step when the Context Item was not a
>node [err:XP0020]
>
>Could you help me?
The problem is caused by the need to surround the value of the parameter
with double quotes (to avoid that the command line parser misinterpret it);
but once we remove the quotes we are left with just cerco-barcelona, that
is a navigation step. You should use
From: "Jose Alberto Coronado" <i02coroj@hotmail.com>
Hi, Anybody can tell me where I could download the latest version of stylusxql to execute a xquery from the command line with parameters?
Is it neccesary to download a new version of Excelon Stylus Studio or I only need the stylusxql.exe file?
Thanks and excuse me if my english is not very good.
--
To reply: mailto:stylus-studio-xquery.7626@stylusstudio.com
To start a new topic: mailto:stylus-studio-xquery@stylusstudio.com
To login: http://www.stylusstudio.com/SSDN/
To (un)subscribe: mailto:stylus-studio-xquery.list-request@stylusstudio.com