Steven and Ralph, thanks, but as I'm still not able to obtain the desired style 
effect, I give you a wider sight on my code.

I'm currently using XSLTForms 1.5.2 with exist-db. After extracting my data I 
put them within a variable, just to have the possibility of adjusting the date 
format for an easier Italian reading. Then I create an instance to contain the 
data. The displaying table enclosed within a repeat is intended to present the 
user with links to be used for opening the correlated files.

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>
        <link rel="stylesheet" type="text/css" 
href="resources/css/xsltforms_style.css" />
        <script src="resources/data/my_javascripts.js"/>
       
        <style type="text/css">
        <!--/*--><css><![CDATA[/**/          
        /*]]>*/<!--/*--></css><!--*/-->
        </style>
       
        <xf:model>
       
            <xf:instance  id="files">
                <data xmlns="">{$directory_files}</data>
            </xf:instance>
       
            <xf:instance id="URL-container" xmlns="">
                <URL />
            </xf:instance>
           
            <xf:instance id="del-row-data" xmlns="">
                <data>
                    <file_name/>
                    <row_num/>
                </data>
            </xf:instance>
           
            <!-- DELETE ACTION -->
        <xf:submission ref="instance('del-row-data')" id="delete" method="post" 
action="action_confirmation_1.xq?action=deldirfiles&amp;arch_id={$arch_id}&amp;f_id={$cart_id}&amp;t_id={$tab_id}&amp;r_id={$row_id}&amp;alert_text=Si
 è sicuri di voler eliminare la riga selezionata?" instance="" replace=""/>
           
        </xf:model>
    </head>
    <body>
        <center>
        <h2 style="color:red">File contenuti nella cartella: «{$directory}»</h2>
       
        <br/>
       
        <xf:group ref="instance('files')">
        <fieldset id="">
            <div class="header-directory-files">
            <table border="0">
             <tr>
                 <td>
                     <div class="leftColumn">Apri file</div>
                 </td>
                 <td style="width: 348px;"/>
                 <td>
                     <div class="leftColumn">Ubi</div>
                 </td>
                 <td style="width: 3px;"/>
                 <td>
                     <div class="leftColumn">Data doc.</div>
                 </td>
                 <td>
                     <div class="leftColumn">Res.</div>
                 </td>
             </tr>
            </table>
         </div>
            <xf:repeat nodeset="files/file" id="files-repeat">
                 <table border="0" >
                 <tr>
                     <td>
                        <xf:trigger submission="replace-form-with" 
appearance="minimal" class="url">
                            <xf:label>
                                <xf:output class="url"  ref="link-text" 
style="width:400px;"/>
                            </xf:label>
                           
                            <xf:action ev:event="DOMActivate">
                                <xf:setvalue class="url" 
ref="instance('URL-container')" value="concat('{$host}','exist/apps/DATI/', 
'{$trow_storage}','/',instance('files')/files/file[index('files-repeat')]/link-file-name,'.',instance('files')/files/file[index('files-repeat')]/link-est)"
 />
                               
                                <xf:load ref="instance('URL-container')" />
                            </xf:action>
                        </xf:trigger>
                     </td>
                     <td style="width: 20px;"/>
                     <td>
                        <xf:output style="width:10px;" ref="ubi"/>
                     </td>
                     <td style="width: 20px;"/>
                     <td>
                         <xf:output style="width:60px;" ref="data1"/>
                     </td>
                     <td style="width: 20px;"/>
                     <td>
                         <xf:output ref="resp"/>
                     </td>
                 </tr>
                 </table>
               
            </xf:repeat>
        </fieldset>
       
        <br/>
       
        <table border="0">
        <tr>
            <td style="width: 15px;"/>
            <td>
                <xf:submit submission="delete">
                   <xf:label><div class="my_special_button" style="width: 
150px;">Elimina riga selezionata</div></xf:label>
                   <xf:action ev:event="DOMActivate">
                        <xf:setvalue 
ref="instance('del-row-data')/file_name/text()" 
value="instance('files')/files/file[index('files-repeat')]/link-file-name" />
                        <xf:setvalue 
ref="instance('del-row-data')/row_num/text()" 
value="instance('files')/files/file[index('files-repeat')]/tr-id" />
                   </xf:action>
                   <xf:delete ev:event="DOMActivate" nodeset="."/>
                </xf:submit>
            </td>
        </tr>
        </table>
       
        </xf:group>
        </center>
    </body>
</html>
let $xslt-pi := processing-instruction xml-stylesheet {'type="text/xsl" 
href="../xsltforms/xsltforms.xsl"'}
  return ($xslt-pi,$form)

Many thanks
Alex

-- 
 Inviato in modo sicuro con Tutanota. Ottieni la tua casella di posta 
elettronica crittografata e senza pubblicità: 
 https://tutanota.com


24 mag 2021, 11:16 da [email protected]:

> Hi all!
> I'm probably not able to find the right CSS syntax for highlighting the 
> current selected row within a repeat...
> The only indications I can find are the following, but no matter where I 
> write them (inside an external css file or directly within the xsltform) I'm 
> not able to obtain any positive result.
>
> .xforms-repeat-item-selected > * {
>           color: red; background-color: white; font-weight:bold; 
> border-bottom:solid 5px #f2f0fb;
>       }
> or:
> .xforms-repeat-item-selected {color: blue; background-color: white;}
>
> Thanks
> Alex
>
> -- 
> Inviato in modo sicuro con Tutanota. Ottieni la tua casella di posta 
> elettronica crittografata e senza pubblicità: 
> https://tutanota.com
>

_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to