XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Antonio CalvoSubject: STYLUSXQL
Author: Antonio Calvo
Date: 26 Jun 2004 07:47 AM
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.


--------------------------------------------------------------------------------




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 *
* *
***************************************************************:)


declare namespace gen = "http://www.grupo-siva.org/2003/EstructurasGenerales";
declare namespace fich = "http://www.grupo-siva.org/2003/Fichas";
declare namespace acc = "http://www.grupo-siva.org/2003/Acciones";
declare namespace hechos = "http://www.grupo-siva.org/2003/Hechos";
declare namespace inst = "http://www.grupo-siva.org/2003/Instituciones";
declare namespace per = "http://www.grupo-siva.org/2003/Personas";
declare namespace tmp = "http://www.grupo-siva.org/2003/Tiempo";
declare namespace a = "http://www.grupo-siva.org/2003/Cartas";

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


}
</Hechos>

Postnext
Alberto MassariSubject: Re: STYLUSXQL
Author: Alberto Massari
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.


Postnext
Antonio CalvoSubject: 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.

Could you Help me.

Thanks.

Postnext
Alberto MassariSubject: Re: STYLUSXQL
Author: Alberto Massari
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"

Hope this helps,
Alberto


Postnext
Antonio CalvoSubject: Re: STYLUSXQL
Author: Antonio Calvo
Date: 29 Jun 2004 03:59 AM
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?

Thanks

Postnext
Alberto MassariSubject: Re: STYLUSXQL
Author: Alberto Massari
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;
>
>&lt;Hechos&gt;
> {$para}
>&lt;/Hechos&gt;
>
>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

StylusXql prueba.xquery -param para="'cerco-barcelona'"

to ensure that the internal part of the parm value is interpreted as a string

Hope this helps,
Alberto


Postnext
Jose Alberto CoronadoSubject: STYLUSXQL
Author: Jose Alberto Coronado
Date: 30 Jun 2004 02:25 AM
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.

Posttop
Ivan PedruzziSubject: RE: STYLUSXQL
Author: Ivan Pedruzzi
Date: 30 Jun 2004 02:37 AM

Hi Jose,

Our command line processors are intented to be ditributed only with Stylus Studio.
You can get an evaluation package here

http://www.stylusstudio.com/download

Thanks
Ivan Pedruzzi
Stylus Studio Team

________________________________

From: stylus-studio-xquery Listmanager [mailto:stylus-studio-xquery.listmanager@stylusstudio.com]
Sent: Wed 6/30/2004 2:27 AM
Subject: STYLUSXQL



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



 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.