Hi there,

I have a problem with a JPath expression that schould iterate over some elements of DOM tree. It should be very easy but for some reason it is not working. The XML data looks like the following:

<site>
  <directory title="...">
     <file>...</file>
     <file>...</file>
     <metadata>
        <raw-images>
           <image file="...">
              <raw>
                  <tag dir="Exif" name="Make">SONY</tag>
                  <tag dir="Exif" name="Date/Time">13.12.2003</tag>
                  ...
               </raw>
           </image>
           <image file="...">
              <raw>
                  <tag dir="Exif" name="Make">CANON</tag>
                  <tag dir="Exif" name="Date/Time">15.11.2001</tag>
                  ...
               </raw>
           </image>
        </raw-images>
     </metadaten>
  </directory>

What i want to do is just to save the "make" of the images to a variable and then write it to my database with esql.

My jpath expression looks like the following:

<jpath:for-each select="site/directory/metada/raw-images/image">
<xsp:logic>make=(String)<jpath:value-of select="./raw/[EMAIL PROTECTED]'Make']"/>;</xsp:logic>
</jpath>


But i always get an 'No value for xpath: ./raw/[EMAIL PROTECTED]'Make']'

What is so strange about this is that the path should be correct because if i am using the <jpath:value-of select> outside the for-each loop with an absolute url:

<xsp:logic>make=(String)<jpath:value-of select="site/directory/metadata/raw-images/image/raw/[EMAIL PROTECTED]'Make']"/>;</xsp:logic>

i can access the "Make".

Maybe it is just a stupid mistake but i just don't know what's wrong. I am thankfull for any hints!

regards,
Garvin









---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to