Hi Maud,

Do you think you could provide us with the XQuery snippet, or the
RESTXQ function, that causes the problem?

Thanks in advance!
Christian


On Wed, May 25, 2016 at 5:30 PM, Maud Ingarao <[email protected]> wrote:
> PS : and if I open this same URL
> http://rey.huma-num.fr/synopsx/files/xsl/tei2html.xsl with oXygen, it opens
> without any problem and I get the nice green validation light whispering to
> me my stylesheet's code is okay...
>
> ________________________________
>
>
> « Ne travaillez jamais »
>
> Maud Ingarao
>
> IHRIM - UMR 5317
> Institut d’histoire des représentations et des idées dans les modernités
> Ecole Normale Supérieure de Lyon - Site Descartes - Bureau R322
> 15 Parvis René Descartes - BP7000 - 69342 Lyon CEDEX 07
> +33 4 37 37 65 79 - [email protected]
>
> Je suis absente le vendredi - Out of office on Fridays
>
> http://ihrim.ens-lyon.fr/
> http://institutdesanti.ens-lyon.fr/
> http://ahn.ens-lyon.fr/
> On 25/05/2016 17:05, Maud Ingarao wrote:
>
> Hello dear friends
>
> Since we upgraded to 8.3 or 8.4, we have strange behaviours with static
> files.
>
> For example, this file cannot be accessed when called from another xsl
> (include or import) as shown in the logs :
> [GET] http://rey.huma-num.fr/inventaire/Rey17470124; Stopped at
> /sites/papiersmmrey/resource/basex/basex.8.4.3/webapp/synopsx/mappings/htmlWrapping.xqm,
> 168/33: [bxerr:BXSL0001] Error on line 7 column 78 of tei2html-fiche.xsl:
> XTSE0165: I/O error reported by XML parser processing
> http://rey.huma-num.fr/synopsx/files/xsl/tei2html.xsl: Server returned HTTP
> response code: 502 for URL:
> http://rey.huma-num.fr/synopsx/files/xsl/tei2html.xsl Stack Trace: -
> /sites/papiersmmrey/resource/basex/basex.8.4.3/webapp/synopsx/mappings/htmlWrapping.xqm,
> 78/47 -
> /sites/papiersmmrey/resource/basex/basex.8.4.3/webapp/synopsx/models/synopsx.xqm,
> 168/49 -
> /sites/papiersmmrey/resource/basex/basex.8.4.3/webapp/synopsx/workspace/rey/_restxq/rey.xqm,
> 443/43
>
> So is it called in the other xsl :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> version="3.0"
>    xmlns="http://www.w3.org/1999/xhtml";
>   xmlns:xs="http://www.w3.org/2001/XMLSchema"; exclude-result-prefixes="xs">
>   <xsl:output method="xml" encoding="UTF-8" indent="no"
> omit-xml-declaration="yes"/>
>   <xsl:import href="http://rey.huma-num.fr/synopsx/files/xsl/tei2html.xsl"/>
> [...]
>
> And still it is available via a direct GET request :
> http://rey.huma-num.fr/synopsx/files/xsl/tei2html.xsl
>
> Notice that the error code is 502 and not 404.
>
> We changed our code as discussed in a previous mail (see below), it seemed
> to work a little, but now we have this new problem showing...
>
> Thanks !
>
> Maud
> ________________________________
>
>
> « Ne travaillez jamais »
>
> Maud Ingarao
>
> IHRIM - UMR 5317
> Institut d’histoire des représentations et des idées dans les modernités
> Ecole Normale Supérieure de Lyon - Site Descartes - Bureau R322
> 15 Parvis René Descartes - BP7000 - 69342 Lyon CEDEX 07
> +33 4 37 37 65 79 - [email protected]
>
> Je suis absente le vendredi - Out of office on Fridays
>
> http://ihrim.ens-lyon.fr/
> http://institutdesanti.ens-lyon.fr/
> http://ahn.ens-lyon.fr/
>
>
>
> Hi Maud,
>
> Sorry for the delay, I’ll soon give you an answer on your other e-mails!
>
> Response :
> HTTP ERROR 400
> Problem accessing /synopsx/files/synopsx.js. Reason:
>
>     Stopped at /resource/basex/webapp/synopsx/_restxq/files.xqm, 38/10:
> [SEPM0017] Value of 'method' must be one of
> (xml,xhtml,html,json,csv,text,adaptive,basex).
>
> With 8.4, the "raw" output method has become obsolete. Your code
> should work if you remove the following line:
>
>    <output:method value='raw'/>
>
> Here is yet another solution for the synopsx.files:file() function,
> which is a bit more compact:
>
>   function synopsx.files:file($file as xs:string) as item()+ {
>     let $path := $G:FILES || $file
>     return (
>       web:response-header(map { 'media-type': web:content-type($path) }),
>       file:read-binary($path)
>     )
>   };
>
> Hope this helps, feel free to ask more questions,
> Christian
>
>
>

Reply via email to