I’m looking a way to get the following string using Xpath 2.0 only:
AAA-Site-1.test.com,BBB-Site-1.test.com
<SystemRoot SystemName='Xpath Test'>
<SystemRoot SystemDomain='test.com' SystemName='AAA-Site-1'>
<Product InstallDate='11/01/2012' ProductName='AAA'/>
</SystemRoot>
<SystemRoot SystemDomain='test.com' SystemName='BBB-Site-1'>
<Product InstallDate='11/01/2012' ProductName='BBB'/>
</SystemRoot>
</SystemRoot>
I tried concat and then string-join, but I get “too many values” …
concat(/SystemRoot/SystemRoot/@SystemDomain,'.',/SystemRoot/SystemRoot/@SystemName)
Is it possible to achieve by using XPath 2.0 only ?
Yes, this is possible: