accessing child nodes for report template

Richard Lyons richard at lyonsart.eu
Sat May 17 15:47:51 BST 2025


Hi.

I admit to being just hopeless at xsl. I have restructured a collection 
and now need to extract sub-nodes (from a 'table' type of data into the 
html of a report. I have a segment of xml (or tc) like this

  <entry id="623">
    <id>623</id>
    <title>P...
    ...
    <imgfiles>
     <imgfile>
      <column>file1.jpg</column>
      <column>text for file1</column>
     </imgfile>
     <imgfile>
      <column>file2.jpg</column>
      <column>Text for file2</column>
     </imgfile>
     <imgfile>
      <column>file3.jpg</column>
      <column>Text for file3</column>
     </imgfile>
    </imgfiles>
    ...
   </entry>

All I need is to insert the equivalent of

   <xsl:value-of select="$entry/tc:imgfiles/imgfile1/column1"/>
and
   <xsl:value-of select="$entry/tc:imgfiles/imgfile2/column2"/>
etc.
into the report template.

I have spent a whole day searching for the correct xsl for this, but 
failed completely. I have discovered that
     <xsl:value-of select="$entry/tc:imgfiles"/>
retrieves
         file1.jpg
         text for file1

         file2.jpg
         Text for file2

         file3.jpg
         Text for file3

But not how to extract the individual columns.

Can anyone here help?

TIA

richard


-- 
Richard Lyons
Romania: strada Morii 41, Miercurea Nirajului, 547410, Mures
    tel: +40 771 604 557
Brasil: rua Constante Jardim 35, Santa Teresa, 20240-230, Rio de Janeiro
    whatsap e tel: +55 (21) 97437-2244



More information about the tellico-users mailing list