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
Agustín BonilloSubject: Problem with Stylus Studio 5.3
Author: Agustín Bonillo
Date: 05 Jul 2004 05:56 AM
Hi, I have installed the new version of Stylus Studio (5.3)

I have a Xquery File that import a module. This Xquery file runs ok with
Stylus Studio 5.1 but with the new version Stylus Studio throws an exception:

Error: Exception Reading Module

Why it is happening???

The "import module" sentence has been changed in the new version???

How I can resolve this problem???

I will be very please if somebody could help me.

Postnext
(Deleted User) Subject: Problem with Stylus Studio 5.3
Author: (Deleted User)
Date: 05 Jul 2004 07:34 AM
Hi Agustin,
the syntax for the "import module" has not changed, so your query
should just work. Can you post (or send me privately) the files
involved?

Thanks,
Alberto

Postnext
Agustín BonilloSubject: Problem with Stylus Studio 5.3
Author: Agustín Bonillo
Date: 05 Jul 2004 09:21 AM
Hi Alberto. These are my files:


----------- Module: Modulo.xquery ----------------

module namespace mod = "
(:">http://www.grupo-siva.org/2003/ModuloFunciones";

(:
Este es el módulo de funciones para las consultas Xquery. :)


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

declare">http://www.grupo-siva.org/2003/Cartas";


declare
function mod:obtener-hechos-distintos($e as xs:string) as xs:string*
{
for $hecho in distinct-values(for $documento in doc("documentos.xml")//archivo
for $doc in doc($documento)//fich:hc
return
string($doc/@id))
return
$hecho
};

declare function mod:numero-hechos($e as xs:string) as xs:integer
{
count(for $hecho in mod:obtener-hechos-distintos("empty")
return $hecho)
};


------------------ File:obtenerListadoHechosDocumentos.xquery -----------

import module namespace mod = " at">http://www.grupo-siva.org/2003/ModuloFunciones"
at
"file://d:\Modulo.xquery";

(:***************************************************************
* *
* NOMBRE: obtenerListadoHechosDocumentos.xquery * *
* DESCRIPCIÓN: Consulta que recupera todas los hechos *
* que se nombran en el conjunto de documentos dado. *
* *
***************************************************************:)


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

<salida">http://www.grupo-siva.org/2003/Cartas";


<salida
xsl="ObtenerListadoHechosDocumentos.xsl">
<Hechos num="{mod:numero-hechos("empty")}">
{
for $hecho in mod:obtener-hechos-distintos("empty")
return
<hecho id="{$hecho}">
{
for $documento in doc("documentos.xml")//archivo
for $doc in doc($documento)//a:datosDeDocumento
for $hc in distinct-values(doc($documento)//fich:hc[string(@id)=$hecho]/string(@nombre))
(: Este for lo pongo para poder obtener la descripción xq si no no me deja:)
for $hcDesc in distinct-values($doc//fich:hc[string(@id)=$hecho]/string(@descripcion))
return
<documento nombre="{string($hc)}" descripcion="{string($hcDesc)}" >{string($documento)}</documento>
}
</hecho>
}
</Hechos>
</salida>

The path is the same (D:\) for all the files (Modulo.xquery,obtenerListadoHechosDocumentos.xquery,documentos.xml)

I hope you can resolve my problem.

Thanks you.

Postnext
Agustín BonilloSubject: Problem with Stylus Studio 5.3
Author: Agustín Bonillo
Date: 05 Jul 2004 09:25 AM
The important question of the previous post is the "Import module" sentence.

The text of the post has been altered when it has been posted.

Posttop
(Deleted User) Subject: Re: Problem with Stylus Studio 5.3
Author: (Deleted User)
Date: 06 Jul 2004 07:24 AM
Hi Agustín,
the problem is in the usage of the "file://D:\modulo.xquery" URL; the
correct (according to the URL specifications) absolute URL is
"file:///D:\modulo.xquery" - note the 3 slashes, instead of 2. You can also

use the relative URL "modulo.xquery".

In any case, we will try to restore the use of the old, non-conformant
prefix in the next update of Stylus, as well as to provide a better error
message.

Alberto


 
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.