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?
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)
};
(:***************************************************************
* *
* NOMBRE: obtenerListadoHechosDocumentos.xquery * *
* DESCRIPCIÓN: Consulta que recupera todas los hechos *
* que se nombran en el conjunto de documentos dado. *
* *
***************************************************************:)
<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)
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.