XML : Xpath and concat elements and text

Please give me a helping hand. I tried to concat the elements from different elements with different types. The result should be From Mustermann to Kraft

  <head>                <persName type="sender" xml:id="ID.1">                  <forename>Max</forename>                  <surname>Mustermann</surname>                </persName>                <persName type="adresser" xml:id="ID.30">                  <forename>Susi</forename>                  <surname>Kraft</surname>                </persName>              </head>    

I tried many different styles and the problem is that I am not able to navigate in the concat function. As far as I know concat is working fine with strings in the same space. But look at this also not possible. What is my mistake and do you have a solution for that. And please I need in XPATH not XSLT. This is also not working.:

  //persName/concat( "This " , "is " , "a " , "test ", surename)     

Any idea why?

No comments:

Post a Comment