Решение XPath 2.0 :
tokenize(replace(replace(replace(substring-after(string-join(//tag5/*|//tag5//@*,","),","),",,","%"),","," ")," ","/"),"%")
Вывод:
String='14/Oct/2000'
String='Oct/2001'
String='2002'
String='1/Jan/1999'
String='1940'
Решение XPath 1.0 :
concat(translate(normalize-space(concat((//tage4Value)[1]/@Day," ",(//tage4Value)[1]/@Month," ",(//tage4Value)[1]/@Year))," ","/"),"|",translate(normalize-space(concat((//tage4Value)[2]/@Day," ",(//tage4Value)[2]/@Month," ",(//tage4Value)[2]/@Year))," ","/"),"|",translate(normalize-space(concat((//tage4Value)[3]/@Day," ",(//tage4Value)[3]/@Month," ",(//tage4Value)[3]/@Year))," ","/"),"|",translate(normalize-space(concat((//tage4Value)[4]/@Day," ",(//tage4Value)[4]/@Month," ",(//tage4Value)[4]/@Year))," ","/"),"|",translate(normalize-space(concat((//tage4Value)[5]/@Day," ",(//tage4Value)[5]/@Month," ",(//tage4Value)[5]/@Year))," ","/"))
Вывод:
String='14/Oct/2000|Oct/2001|2002|1/Jan/1999|1940'
Или с новым разделителем строк:
concat(translate(normalize-space(concat((//tage4Value)[1]/@Day," ",(//tage4Value)[1]/@Month," ",(//tage4Value)[1]/@Year))," ","/"),codepoints-to-string(10),translate(normalize-space(concat((//tage4Value)[2]/@Day," ",(//tage4Value)[2]/@Month," ",(//tage4Value)[2]/@Year))," ","/"),codepoints-to-string(10),translate(normalize-space(concat((//tage4Value)[3]/@Day," ",(//tage4Value)[3]/@Month," ",(//tage4Value)[3]/@Year))," ","/"),codepoints-to-string(10),translate(normalize-space(concat((//tage4Value)[4]/@Day," ",(//tage4Value)[4]/@Month," ",(//tage4Value)[4]/@Year))," ","/"),codepoints-to-string(10),translate(normalize-space(concat((//tage4Value)[5]/@Day," ",(//tage4Value)[5]/@Month," ",(//tage4Value)[5]/@Year))," ","/"))
Вывод:
String='14/Oct/2000
Oct/2001
2002
1/Jan/1999
1940'