Re: [Xsltforms-support] Data load issue
Brought to you by:
alain-couthures
From: Tim T. <tim...@gm...> - 2020-03-11 16:09:06
|
Hi, Alex, Are you sure that the data is not being loaded at all into the xforms:instance? The xforms:group element takes a single-node binding, so @nodeset is not a valid attribute for xforms:group (should be @ref or @bind). If you're able to share sample data, I'd be happy to test the form (I don't have eXist set up, but could try in BaseX). Best, Tim -- Tim A. Thompson Discovery Metadata Librarian Yale University Library On Wed, Mar 11, 2020 at 9:12 AM Alessandro via Xsltforms-support < xsl...@li...> wrote: > Hi all, > in passing from eXist-db 3.6 to 5.2 I'm adapting the code of my previous > BetterFORMS to XSLTForms. At the moment I'm trying to use xsltforms1.3, but > also the following minimal code does not seem to work. Data are not loaded, > despite any attempt of modifying the syntax of scr="" or node=""... > > After referencing the data xml file through $file within the model, a list > of "categorie" should be listed by referencing the parent node ("legenda") > containing the list (within the "xforms:group") and the final single nodes > "categoria" (within the "xforms:repeat"). What's wrong with this structure? > Many thanks > Alex > > 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', 'XXX') > > let $file := concat($app_collection, '/', $my_funcs:my_archive) > > let $form := > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xforms=" > 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> > <link rel="stylesheet" type="text/css" > href="resources/css/list_forms.css"/> > <style type="text/css"> > <![CDATA[ > > ]]> > </style> > > <xforms:model> > <xforms:instance id="my-category-list" src="{$file}" xmlns="" /> > </xforms:model> > </head> > <body> > <h1>Categorie per la tabella {$table_title}</h1> > > <xforms:group > nodeset="/archivi/archivio[@id='{$arch_id}']/cartella[@id='{$fold_id}']/tabella[@id='{$tab_id}']/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: 220px;"/> > <td> > <div class="rightColumn">Nome categoria per > esteso</div> > </td> > </tr> > </table> > </div> > > <xforms:repeat id="list" nodeset="categoria"> > <table border="0"> > <tr> > <td> > <xforms:input ref="@id" class="leftColumn" /> > </td> > <td style="width: 10px;"/> > <td> > <xforms:input ref="text()" class="rightColumn" /> > </td> > </tr> > </table> > </xforms:repeat> > </fieldset> > > </xforms:group> > </body> > </html> > let $xslt-pi := processing-instruction xml-stylesheet {'type="text/xsl" > href="../xsltforms/xsltforms.xsl"'} > return ($xslt-pi,$form) > > > > -- > Inviato in modo sicuro con Tutanota. Ottieni la tua mailbox crittografata > e senza pubblicità: > https://tutanota.com > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |