[Xsltforms-support] XsltForms 15 beta does not work for me
Brought to you by:
alain-couthures
From: Alessandro <ca...@tu...> - 2020-05-13 13:57:55
|
Dear all, after reinstalling eXist-db I have lost the xsltforms release I was using and the last beta release does not seem to be working anymore. All I get is a permanent "...Loading..." square message... The following is the XForm I'd like to style (already recently reviewed by Tim Thompson): xquery version "3.0"; import module namespace my_funcs="http://www.my_funcs.net" at "modules/my_app_functions_2.xql"; declare variable $app_collection := 'resources/data'; declare variable $fold_id := request:get-parameter("f_id", ""); declare variable $tab_id := request:get-parameter("t_id", ""); declare variable $table_title := request:get-parameter('t_title', ''); declare variable $arch_id := request:get-parameter("arch_id", ""); let $login := xmldb:login($app_collection, 'admin', 'password') let $categories := doc(concat($app_collection, '/', $my_funcs:my_archive))/archivi/archivio[@id=$arch_id]/cartella[@id=$fold_id]/tabella[@id=$tab_id]/legenda let $new_value := doc(concat($app_collection, '/', $my_funcs:my_archive))/archivi/options/new_categoria let $form := <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <head> <script src="resources/data/my_javascripts.js"/> <style type="text/css"> <!--/*--><css><![CDATA[/**/ h1 { padding:0px 0 0 50px; font-family: 'Aller Display',Georgia, Times New Roman, Sans; font-size:20pt; font-weight:400; color:red; letter-spacing:2px; line-height:1.2em; } .my_button { height:16pt; font-size:10pt; color: red; } .my_special_button { font-size:10pt; padding: 1px; } .my_box { background-color: #ECF1C4; } label, legend { font-weight: bold; } .header { color: white; background-color: gray; font-weight: bold; display: inline-block; width: 607px; margin-left: -1px; } input { font-size: 10pt; width: 300px; background-color: #ECF1C4; margin-right: 0; border: 0; } .list-table tbody { display:block; margin: -1px; } .list-table td { border: 1px solid #ECF1C4; } .list-table tr { height:20px; } .list-table { border-collapse: collapse; background-color: #ECF1C4; } .leftColumn, .rightColumn { font-size: 11pt; display: inline-block; } .leftColumn { margin-left: 0px; margin-right: 0; } .rightColumn { left: 0; margin-left: 0px; } fieldset { width: 605px; font-size: 10pt; margin-left: 20px; } /*]]>*/<!--/*--></css><!--*/--> </style> <xf:model> <xf:instance id="my-category-list"> <data xmlns="">{$categories}</data> </xf:instance> <xf:submission id="save-to-local-file" method="post" action="query_form_list_2.xq?arch_id={$arch_id}&f_id={$fold_id}&t_id={$tab_id}" replace="instance" instance="my-category-list"> <xf:action ev:event="xforms-submit-done"> <xf:message level="modal">Dati correttamente aggiornati!</xf:message> </xf:action> <xf:action ev:event="xforms-submit-error"> <xf:message level="modal">Si è verificato un errore in fase di salvataggio!</xf:message> </xf:action> </xf:submission> </xf:model> </head> <body> <center> <h1>Categorie tabella: {$table_title}</h1> <xf:group ref="instance('my-category-list')/legenda"> <fieldset> <legend>Lista delle categorie attualmente disponibili</legend> <div class="header"> <table border="0"> <tr> <td> <div class="leftColumn">Abbreviazione</div> </td> <td style="width: 205px;"/> <td> <div class="rightColumn">Nome categoria per esteso</div> </td> </tr> </table> </div> <xf:repeat id="list" nodeset="categoria"> <table border="0" id="categories" class="list-table"> <tr> <td> <xf:input ref="@id" class="leftColumn" /> </td> <td> <xf:input ref="text()" class="rightColumn" /> </td> </tr> </table> </xf:repeat> </fieldset> <br/> <table border="0"> <tr> <td style="width: 15px;"/> <td> <!-- style="padding-top: 15pt;" --> <xf:trigger> <xf:label><div class="my_special_button">Elimina riga selezionata dalla lista delle categorie</div></xf:label> <xf:action ev:event="DOMActivate"> <xf:delete nodeset="categoria" at="index('list')" /> </xf:action> </xf:trigger> </td> <td style="width: 15px;"/> <td> <xf:trigger> <xf:label><div class="my_special_button">Inserisci nuova categoria dopo riga selezionata</div></xf:label> <xf:action ev:event="DOMActivate"> <xf:insert nodeset="categoria" at="index('list')" position="after" /> <xf:setvalue ref="categoria[index('list')]/@id" value="'{$new_value}'"/> <xf:setvalue ref="categoria[index('list')]/text()" value="'{$new_value}'"/> <!--<xf:setvalue ref="SelectedRow" value="index('list')" />--> </xf:action> </xf:trigger> </td> </tr> </table> <br/> <table border="0"> <tr> <td style="width: 275px;"/> <td > <xf:trigger> <xf:label class="my_button">❮❮Torna❮❮indietro</xf:label> <xf:action ev:event="DOMActivate"> <xf:load resource="javascript:GoBack()" /> </xf:action> </xf:trigger> </td> </tr> <tr> <td style="height: 40px;"/> <td> <!-- style="padding-top: 15pt;" --> <xf:submit submission="save-to-local-file"> <xf:label><div>Salva modifiche</div></xf:label> </xf:submit> </td> </tr> </table> </xf:group> </center> </body> </html> let $xslt-pi := processing-instruction xml-stylesheet {'type="text/xsl" href="../xsltforms15/xsltforms.xsl"'} return ($xslt-pi,$form) Many thanks Alex -- Inviato in modo sicuro con Tutanota. Ottieni la tua mailbox crittografata e senza pubblicità: https://tutanota.com |